I have some code that checks for a value of say, var in the link.
Http://www.blah.com/index.php?var=
But when a link like that is sent to the server it returns a database error since var isn’t set. I have tried isset (which it is set so that wont stop it) but !empty doesn’t stop the var from being sent to the DB.
This is the code
if(isset($_GET['id']) && !empty($_GET['id'])){
$id = mysql_prep($_GET['id']);
....
}
Any help?
1 Answer