help... I am using this to insert data into the table called "press" and the variables have been passed through to this page to insert, however it is not saving the data in the database. It is not kicking in an error either. Any suggestions. Its probably something simple but I cant see it.
Help... please...
Phil
<?php
$dbquery = "select * from press where title=\"$title\"";
$result = mysql_db_query($dbname,$dbquery); if(mysql_error()!=""){echo mysql_error();}
if($row = mysql_fetch_array($result))
{
ErrMessage("Sorry! This Press Release Title already Exist In Your Data Base.");
}
else
{
////////////////////////////////////////////////////////////
$dbqueryid = "select max(autoid)+1 as maxautoid from press";
$resultid = mysql_db_query($dbname,$dbqueryid) or die("<script language='javascript'> location.href='oops.php';</script>");
if($rowid = mysql_fetch_array($resultid))
{
if (trim($rowid[maxautoid]) != "")
{
$rowid[maxautoid] = $rowid[maxautoid];
}
else
{
$rowid[maxautoid] = 1;
}
}
else
{
$rowid[maxautoid] = 1;
}
////////////////////////////////////////////////////////////
$dbquery = "insert into press values ( NULL , ";
$dbquery = $dbquery."\"".addslashes(stripslashes($categorytype))."\" , ";
$dbquery = $dbquery."\"".addslashes(stripslashes($date))."\" , ";
$dbquery = $dbquery."\"".addslashes(stripslashes($title))."\" , ";
$dbquery = $dbquery."\"".addslashes(stripslashes($body))."\" , ";
$dbquery = $dbquery."\"".addslashes(stripslashes($footer))."\" , ";
$dbquery = $dbquery."\"".addslashes(stripslashes($activestatus))."\" ) ";
echo "
<TABLE cellspacing=0 cellpadding=0 Align=center width='500' border=0>
<tr><td align=center height=25><font color=000000 class=\"adminstd\"><b>Thanks</b></font></td></tr>
<tr><td align=center height=25><font color=000000 class=\"adminstd\"><b>Your Press Release has been Successfully added.</b></font></td></tr>
</table>
";
}
?>