Home · PHP Scripts · add data to a mysql database

cms-zen dot com

online web development :: art and design :: fun stuff
best-budd
sNews Development cms road trip PHP Scripts Photoshop Guides Css Guides Music and video clips Art Gallery Low Light Photography Impression Photography

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