Last active
January 23, 2019 18:38
-
-
Save gmelodie/0fd9647bbf18ccf4c37d6e762fef9bff to your computer and use it in GitHub Desktop.
Small correction to vote_db_v3.php
This file contains hidden or 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 | |
// 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