ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-general
php-general
[PHP] getting around the undefined index
by Ross other posts by this author
Nov 27 2006 11:24AM messages near this date
Re: [PHP] text only and text sizer | Re: [PHP] getting around the undefined index
I have not found a satisfactory way of doing this yet!!!!


$text = $_REQUEST['text_size'];
if ($text) {
echo $text;
}


I send the $text_size variable to the browser with lines like...

<a href="<? $_SERVER['PHP_SELF'];  ?> ?text_size=small" class="size1" 
id="one"> A</a>


When the page initially loads I get a undefined index error as it does not 
exist but is there a way of wrapping in in a switch statement or funtion so 
the variable is only used when $_REQUEST['text_size']; actually exists.


Ross

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Ross
Paul Novitski
Eric Butera
Stut

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved