Created
August 16, 2013 19:33
-
-
Save christianselig/6252852 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 | |
$db = new mysqli("localhost", "...", "...", "..."); | |
if ($db->connect_error) { | |
echo "Could not connect to database."; | |
exit; | |
} | |
else { | |
$emerd = $_POST["email"]; | |
$db->query("INSERT INTO emails (email) VALUES (' " . $emerd . "')"); | |
echo json_encode(array( | |
"email" => $emerd | |
)); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment