Skip to content

Instantly share code, notes, and snippets.

@seanhess
Created March 18, 2011 20:48
Show Gist options
  • Save seanhess/876811 to your computer and use it in GitHub Desktop.
Save seanhess/876811 to your computer and use it in GitHub Desktop.
<?php
mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("date_ideas") or die(mysql_error());
$title=$_POST['title'];
$desc=$_POST['desc'];
$submit="INSERT INTO ideas (title, desc) VALUES ('$title','$desc');";
echo ("<p>Query: $submit</p>");
mysql_query($submit)
or die(mysql_error());
echo ("Idea submitted. Click <a href='Webroot/submit.php'>here</a> to go back and post another idea.");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment