ok so i have a form containing details of a movie (title, year, overview...) when i submit the form i would like to update the record in an access database.
heres what i have which does not seem to be working:
$title=$_POST['MovieTitle'];
$Year=$_POST['ProdYear'];
$trailerURL=$_POST['Trailer'];
$overview=$_POST['overview'];
$movieID = $_POST['movieID'];
$conn=odbc_connect('MyMovies','','');
$sql="UPDATE tblTitles
SET nvcLocalTitle = '" . $title . "',
intProductionYear = '" . $Year . "',
nvcTrailerUrl = '" . $trailerURL . "',
ntxDescription = '" . $overview . "'
WHERE intID =" . $movieID;
$rs=odbc_exec($conn,$sql);
if (!$rs)
{
exit("Error in SQL");
}
i basically just took the code i used to pull the info from the database and changed the SQL query to be an update query. it does not seem to be working so what do i need to change?
any help on this would be appreciated. i know that generally most people use mysql with php but in this specific application it unfortunately has to be access. so i just need to be able to run SQL code against it.