diff --git a/cek_comment.php b/cek_comment.php index 0669454..bea67cd 100644 --- a/cek_comment.php +++ b/cek_comment.php @@ -9,9 +9,7 @@ $comment = $_POST['comment']; } $query = "INSERT INTO komentar VALUES('','$nama','$comment', '$email', '$hp')"; - if($query){ - echo "<script> window.alert('Terimakasih Telah Memberikan Kritik dan Saran!')"; - } + $input = mysqli_query($koneksi, $query) or die(mysqli_error($GLOBALS["___mysqli_ston"])); if($input){ diff --git a/form_comment.php b/form_comment.php index 62e2c43..9985535 100644 --- a/form_comment.php +++ b/form_comment.php @@ -21,7 +21,7 @@ require_once(dirname(__FILE__).'/common/header.php'); <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"> + <input name="phone" required placeholder="Nomor Handphone" class="form-control" type="phone"> </div> </div> </div> @@ -37,7 +37,7 @@ require_once(dirname(__FILE__).'/common/header.php'); <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> +<button type="submit" onclick="window.alert('Terimakasih Telah Memberikan Kritik dan Saran!');" class="btn btn-primary" name="kirim"> Kirim <span class="glyphicon glyphicon-send"></span></button> </fieldset>