Skip to content

Instantly share code, notes, and snippets.

@gmelodie
Last active January 23, 2019 18:38
Show Gist options
  • Save gmelodie/0fd9647bbf18ccf4c37d6e762fef9bff to your computer and use it in GitHub Desktop.
Save gmelodie/0fd9647bbf18ccf4c37d6e762fef9bff to your computer and use it in GitHub Desktop.
Small correction to vote_db_v3.php
<?php
// Insert data to database
if ($_POST["liked"] === "yes") {
$vote = TRUE;
} else {
$vote = FALSE;
}
$insert = "INSERT INTO vote (id, liked) VALUES ('" . $_SERVER['REMOTE_ADDR'] . "', " . $vote . ")";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment