Created
February 2, 2012 18:48
-
-
Save lithid/1725081 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
$ndb = mysqli_connect ( | |
'localhost', | |
'user', | |
'pw', | |
'db') or die ('Error connecting. Check yo factz!'); | |
$output_form = false; | |
$content=$_POST['content']; | |
$content = mysql_real_escape_string($content); | |
if (isset($_POST['submit'])) { | |
$query = "INSERT INTO table (content)" . | |
"VALUES ('$content')"; | |
$result = mysqli_query($ndb, $query) | |
or die ('Error writing to database'); | |
mysqli_close($ndb); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment