In my code I am checking whether variables exist. But it is not turning out the way I expect it.
This is what I'm trying to do:
- Retrieve
$resultfrom database. - Execute a block of code only if a result has been extracted (otherwise do nothing/skip over/move forward).
I used if(isset($result)) but it doesn't seem to be working, looks like the if is being executed, even though it shouldn't when there is no data in $result. (but with problems because there is no actual $result variable to use in this block)
mysql_queryand now moved it to themysql_fetch_assoc, and changed it toif($result)and now it is working. Thanks!