Could anyone tell me why this is not inserting into my database.This part of my code is to overwrite information that is already stored in the database. So im trying to overwrite it by where the id is eqaul to the row clicked on.
It is taking in the id alright. Im not sure why it isnt inserting into the database.Could anyone help me with this please? thank you
<?php
$id = $_GET["filmID"];
echo $id;
?>
<br><br>
<?php $db = mysql_connect("", "", "");
mysql_select_db("",$db);
# $query contains the SQL statements that will be executed by MySQL
$query = "INSERT INTO CurrentlyShowing (film_name,showing_times,screen_number,official_url,film_image,age_rate) VALUES ('$film','$time','$screen','$link','$image','$rate') where filmId='$id'";
echo $query;
if(mysql_query($query,$db))
{ echo "<br>Insert successful<br>\n"; }
else
{ echo "<br>Insert not successful<br>\n"; }
/* Closing connection */
mysql_close($db);
?>