I have been working with the book php fast and easy web development and have it to were I can load variables to mysql on my server. The problem is the book does not show how to replace the files just add to the database, the project I am working on just needs to override the information and replace it with new. here is the script from the book.
<?
if ((!$id) || (!$format) || (!$title)) {
header("Location: http://localhost/show_addrecord.html");
exit;
}
$db_name = "xxx";
$table_name = "my_music";
$connection = @mysql_connect("xxx", "xxx", "xxx")
or die("Couldn't connect.");
$db = @mysql_select_db($db_name, $connection)
or die("Couldn't select database.");
$sql = "INSERT INTO $table_name //<-------- THIS IS WERE MY PROBLEM COMES IN
(id, format, title, artist_fn, artist_in, rec_label, my_notes,date_acq)
VALUES
('$id',
'$format','$title','$artist_fn','$artist_in','$rec_label','$my_notes','$date_acq')";
$result = mysql_query($sql,$connection)
or die("Couldn't execute query because ".mysql_error());
?>