bidvertiser

Wednesday, October 22, 2008

Inserting data into a table code

mysql_connect("localhost", "admin", "1admin") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());
// Insert a row of information into the table "example"
mysql_query("INSERT INTO example (name, age)
VALUES('Timmy Mellowman', '23' ) ") or die(mysql_error());
mysql_query("INSERT INTO example (name, age)
VALUES('Sandy Smith', '21' ) ") or die(mysql_error());
mysql_query("INSERT INTO example (name, age)
VALUES('Bobby Wallace', '15' ) ") or die(mysql_error());
echo "Data Inserted!";
?>

No comments: