Click to See Complete Forum and Search --> : Handling missing URL parameters


Mig
08-01-2007, 03:52 AM
Anyone have a simple way to handle missing URL parameters?

$c = $_GET['c'];

...to set the variable to a default if c is not passed.

Thanks.

NogDog
08-01-2007, 06:29 AM
$c = (isset($_GET['c'])) ? $_GET['c'] : 'default value';