I'm just having a bit of trouble with updating a database via a php form process, I've tried various things thus far to get it working but to no avail, All the pages seem to be working except for the _process.php itself;
<?php
/*saves the form data to the database */
//read data passed via form
$cabinID = $_POST['txtcabinID'];
$cabintype = $_POST['txtCabinType'];
$cabindesc = $_POST['txtCabinDesc'];
$pricepern= $_POST['txtppN'];
$priceperw = $_POST['txtppW'];
$photo = $_POST['txtPhoto'];
//connect to server and database
include 'sqldb_connect.inc.php';
//set up query
$query = "update tblCabins set
cabinType='$cabintype'
cabinDescription='$cabindesc',
pricePerNight='$pricepern',
pricePerWeek='$priceperw',
PHOTO='$photo',
where cabinID ='$cabinID'"; // important
//execute query
$result = mysql_query($query);
if(!$result)
{
mysql_close();
exit("Query failed");
}
mysql_close();
exit ("Cabin updated successfully");
?>
</body>
</html>
Can anyone see any problems within the page that stand out? Appreciate it :)