add data to a mysql database
This is simple database connection php script
<?php
/**
* Change the first line to whatever
* you use to connect to the database.
*
* We're using two values, title and
* text. Replace these with whatever
* you want to add to the database.
*
* Finally, change tablename to the
* name of your table.
*/
// Your database connection code
db_connect();
$query = "INSERT INTO tablename(title, text) VALUES('$title','$text')";
$result = mysql_query($query);
echo "The data has been added to the database.";
?>
07.12.2006. 18:25
