Created
January 27, 2018 05:32
-
-
Save wichaksono/054b1087bb8cc4004bb7f8cced542e98 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'config.php'; | |
if (isset($_GET['nomer']) && ! empty($_GET['nomer'])) { | |
$nomerVote = $_GET['nomer']; | |
// sql untuk menambahkan vote kedatabase | |
$sql = "INSERT INTO voting (id_opsi, date_create) VALUES ('$nomerVote', NOW()) "; | |
$insert = $connect->query($sql); | |
if ($insert) { | |
echo "<script>alert('Terima Kasih atas Vote nya'); window.location.href='index.php';</script>"; | |
exit(); | |
} else { | |
die('Oops!! Internal Error'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment