Or you can simply turn off NOTICE error reporting in the php.ini file or use ini_set or error_reporting() to not include notices. This should not affect functionality.
--- Lars Torben Wilson <[EMAIL PROTECTED]> wrote: > On Wed, 2003-06-11 at 12:22, Ryan M wrote: > > Thanks for the advice... The link worked.... Now it is saying > this: > > > > Notice: Undefined index: action in.... > > > > It only says this if there is no action...it goes away once I > click the link > > and the action=someaction.... Is there a way to fix my php so > that I dont > > have to change all of the web sites hosted on my server?? Thanks! > > > > Ryan > > Check and initialize your input variables: > > if (!isset($_GET['action'])) { > $action = ''; > } else { > $action = $_GET['action']; > } > > switch ($action) { > case 'something': > do_something(); > break; > case 'something_else': > do_something_else(); > break; > default: > echo "Unrecognized action given"; > break; > } > > If this is something you need to do for every page on your site, > put > the if() check into an auto-prepended file or something. > > > Hope this helps, > > Torben > > > -- > Torben Wilson <[EMAIL PROTECTED]> > +1.604.709.0506 > http://www.thebuttlesschaps.com > http://www.inflatableeye.com > http://www.hybrid17.com > http://www.themainonmain.com > -----==== Boycott Starbucks! http://www.haidabuckscafe.com > ====----- > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > ===== Mark Weinstock [EMAIL PROTECTED] *************************************** You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing. *************************************** __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php