A lot Information

There are everything from everywhere

MySQL Insert Example Script

1
2
3
4
5
6
7
8
9
10
11
<?php
// Connect
mysql_connect("localhost", "name", "pass") or die(mysql_error());
mysql_select_db("dbname") or die(mysql_error());
 
// Insert into "test"
mysql_query("INSERT INTO test (name, nickname) VALUES ('Arnold', 'Shwarc')") or die(mysql_error());
 
echo "Done!";
 
?>
<?php
// Connect
mysql_connect("localhost", "name", "pass") or die(mysql_error());
mysql_select_db("dbname") or die(mysql_error());

// Insert into "test"
mysql_query("INSERT INTO test (name, nickname) VALUES ('Arnold', 'Shwarc')") or die(mysql_error());

echo "Done!";

?>

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code lang=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" extra="">