New at this but have searched without success. I get the following errors on my script:
"Notice: Use of undefined constant sStatus - assumed 'sStatus' in"...
and
"Warning: mysql_numrows() expects parameter 1 to be resource, boolean given in"...
I'm hoping the later is due to the first issue. Please let me know if you need more of the code, but the parts it relates to are:
line31:
$sStatus = $_POST['sStatus'];
and lines 43 through 53:
if (sStatus == "all")
{
$query="SELECT * FROM tickets WHERE RequestBy='$sName'";
}
else
{
$query="SELECT * FROM tickets WHERE RequestBy='$sName' AND Status='$sStatus";
}
//put query in result and count rows ready to loop for table display
$result=mysql_query($query);
$num=mysql_numrows($result);
sStatus gets pulled from a form on the homepage and is either "0", "1" or "all. The same variable gets used further down in the script with an if to changed "0" or "1" to "open" or "closed" successfully.
Any help most appreciated. Martin