Reply to Re: Newbie - Notice:Undefined index:

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация