FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!

PHP MYSQL INSERT




Prepare your variables first:

$first = “Ian”;
$last = “Lin”;
$email = “linian11@yahoo.com”;
second, include your database connection string:

include ‘DB_connection.php’;
do your query:

mysql_query(“INSERT INTO your_table_name (first,last,email) VALUES(‘$first’,'$last’,'$email’)”) or die(mysql_error());
last, close your connection:

mysql_close($con);

That is all there is to it!
Good Luck,
Ian L.,
Lead Developer
Jafty.com



0 blog comments below




FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.