The variable: "$num_rows" is not even being set and has no value.
$result2 = mysql_query("SELECT * FROM `mycity_vehicles` WHERE `id` = '$vehID'");
while($row2 = mysql_fetch_array($result2))
$num_rows = mysql_num_rows($result2);
{
if(empty($num_rows)) {
echo "empty";
}
else {
echo $num_rows;
}
Can someone please help me with this?