sigh
Okay, I went back and fixed it (I think) THis is what it looks like now:
<?php
//connect to db
$db = mysql_connect("localhost", "dbusername", "dbpassword");
mysql_select_db("dbname",$db);
$sql="SELECT * FROM table WHERE id='$id'";
$result=mysql_query($sql);
$num=mysql_num_rows($result);
if (empty(mysql_result($results, 0)))
{
echo "ID '$requested_id' is available.";
}
else
{
echo "Hey bozo, ID '$requested_id' is already taken.";
}
}
?>
Now I get this error:
Parse error: parse error, expecting T_VARIABLE' or'$''at line 18, which is this:
if (empty(mysql_result($results, 0)))
??????
By the way, thanks for all your help so far!