You are here: Re: Trapping Undefined Indicies « PHP Programming Language « IT news, forums, messages
Re: Trapping Undefined Indicies

Posted by Jerry Stuckle on 07/23/05 07:48

IWP506@gmail.com wrote:
> Hey, here's some code:
>
> switch ($_GET["content"]) {
> case "1":
> include("./1_content.html");
> break;
> case "2":
> include("./2_content.html");
> break;
> default:
> echo("nothing!");
> }
>
> That works perfectly... But what can I do about having the page not
> show undefined index errors if they don't insert ?content= at the end
> of the address?
>
> Thanks,
> iwp506@gmail.com
>

if (isset($_GET['content']))
switch.....
else .....

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this 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

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