I'm trying to figure out what I'm doing wrong here. I'm trying to update the vessel info in a database. The vessel_id is passed thru the address bar. I listed the code below. Any help would be great! Thanks in advance.
[<?
include_once "../main.php";
if(isset($submit) && $submit == 'Save changes')
{
$pday = date('d', mktime(0,0,0,0, date(d)));
$pmonth = date('m', mktime(0,0,0, date(m), date(d)));
$pyear = date('Y', mktime(0,0,0,date(m) ,date(d) , date(Y)));
$q3 = "update vessel_info set
name = '$_POST[name]',
captain = '$_POST[captain]',
mate = '$_POST[mate]',
engineer = '$_POST[engineer]',
deckhand = '$_POST[deckhand]',
status = '$_POST[status]',
charter_name = '$_POST[charter_name]',
location = '$_POST[location]',
crewchange = '$_POST[crewchange]',
updated_by = '$_SESSION[cname]',
pmonth = \"$pmonth\",
pday = \"$pday\",
pyear = \"$pyear\",
where vessel_id = '$_GET[vessel_id]' ";
(Above is where I'm getting the error)
$r3 = mysql_query($q3) or die(mysql_error());
echo "<br><br><center><span class=BlackText>The vessel $name was updated.</span></center>";
include_once('../footer.php');
exit;
}
$q1 = "select * from vessel_info where vessel_id = \"$_GET[vessel_id]\" ";
$r1 = mysql_query($q1) or die(mysql_error());
$a1 = mysql_fetch_array($r1);
?>]



Reply With Quote


Bookmarks