Commit b7bf92e5 by Mei Romauli Sagala

fungsi memberikan kritik dan saran

parent 499d1ed8
<?php
include('koneksi.php');
if(isset($_POST['kirim'])){
$nama = $_POST['name'];
$hp = $_POST['phone'];
$email = $_POST['email'];
$comment = $_POST['comment'];
}
$input=mysql_query("INSERT INTO komentar VALUES('','$nama','$comment','$email','$hp')") or die(mysql_error());
if($input){
echo("<script> alert('Terimakasih atas ulasan anda')</script>");
echo "<meta http-equiv='refresh' content='1 url=form_comment.php'>";
}else{
echo 'gagal mengirimkan komentar';
header("location:form_komentar.php");
}
?>
\ No newline at end of file
<?php
require_once(dirname(__FILE__).'/koneksi.php');
require_once(dirname(__FILE__).'/common/header.php');
?>
<form class="well form-horizontal" action="cek_comment.php" method="post" id="contact_form">
<fieldset>
<legend>Berikan kritik dan saran anda pada kolom dibawah ini</legend>
<div class="form-group">
<label class="col-md-4 control-label">Nama</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input name="name" required placeholder="Isi Nama Anda" class="form-control" type="text">
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label">Hp </label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-earphone"></i></span>
<input name="phone" required placeholder="Nomor Handphone" class="form-control" type="text">
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label">E-Mail</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
<input name="email" required placeholder="E-Mail" class="form-control" type="text">
</div>
</div>
</div>
<div class="form-group col-md-8" style="margin-top: 20px;margin-left: 15px;">
<label for="comment" required >Kritik Dan Saran:</label></div>
<textarea class="form-control" rows="5" id="comment" name="comment" placeholder="Masukkan Ulasan Anda"></textarea><br>
<button type="submit" class="btn btn-primary" name="kirim"> Kirim <span class="glyphicon glyphicon-send"></span></button>
&nbsp;
</fieldset>
</form>
<?php
require_once(dirname(__FILE__).'/common/footer.php');
?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment