Ok, I had read the post about mysql results, but hadn't figured out what was happening.
instead of doing it this way:
$result2=mysql_query("SELECT * FROM orders WHERE ip_address='$Users_IP_address' AND part='$t'");
if(!$result2)
{
...
}
else
{
...
}
I needed to do this:
$result2=mysql_query("SELECT * FROM orders WHERE ip_address='$Users_IP_address' AND part='$t'");
$number=mysql_num_rows($result2);
if(!$number)
{
...
}
else
{
...
}
If number is 0... which it will be in this specific case, then it executes the code as I expected. I was keying off the result itself; why the result was producing anything at all, I'm not sure. But I'm glad to see that the solution was easy. Thanks!🙂