I can’t figure out why this script isn’t working.
<?php
if (($_GET['p'] != 'index') &&
($_GET['p'] != 'reg') &&
($_GET['p'] != 'login') &&
($_GET['p'] != 'ad') &&
(!isset($_GET['p']))):
?>
<?php endif; ?>
I want to not display the error page if the $_GET is not set, which in my experience (!isset($_GET['p'])) should do.
If
$_GET['p']is not set, you can’t check$_GET['p'] != 'index'and all the others. You’ll have to check if it’s set first:A better solution would be to put all those values in an array, and check if
$_GET['p']is in the array:EDIT:
Now that you provided some more info, here’s what you should do: