I have the following which doesn\'t work properly as $_GET[\'category\'] can also equal 0.
$_GET[\'category\']
if ( empty( $_GET[\'category\'] ) ){ // do something
Make sure the name attribute of the element that is doing get on the previous page is set, preferably to the same as its id. Then:
name
get
id
$category=''; if ( !isset( $_GET['category'] ) ){ //1 } else { $category=$_GET['category']; //3 if($category==0){ //2 } }