Posted by Good Man on 06/14/05 18:13
"Joseph Melnick" <jmelnick@jphp.com> wrote in
news:U-udnXX38YCZVTPfRVn-rA@rogers.com:
> Hello Darren,
>
> I think that the offending line Is the If statement below as
> $_GET["cat_id"] may not exist:
> if ( $_GET["cat_id"] == "$cat_id") {
>
> to fix this you could use a statement like th one below.
> if (array_key_exists("cat_id",$_GET) and $_GET["cat_id"] ==
> "$cat_id") {
>
> Cheers
or, quite simply:
@$cat_id = $_GET['cat_id']; // @ surpresses the error if it doesnt exist
if ($cat_id=="") { //$cat_id was not set
}
[Back to original message]
|