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
.



Relevant Pages

  • Re: "background "
    ... Michael Koerner [MS PPT MVP] ... Echo ... > I changed the browser color when I go it on www it was still black. ...
    (microsoft.public.powerpoint)
  • Re: Home Network: Comp A can access CompB, but CompB doesnt see CompA
    ... You might not have permission to ... Make sure the browser service is running on one computer. ... The Microsoft Browstat program will show us what browsers you have in your ... @echo CDiagnosis %Version%>c:\cdiag.txt ...
    (microsoft.public.windowsxp.network_web)
  • Re: [PHP] Form Input Type="File"
    ... echo "<!DOCTYPE HTML PUBLIC ... browsers after the form submission, ... It seems that IE is the only browser that is passing ...
    (php.general)
  • Improving a simple PHP form
    ... Other browser information, ... To the following PHP code which is posted to by a normal form: ... if you get an Bad referer error ... echo "Sorry, an error occurred and the message could not be sent. ...
    (alt.php)
  • Re: Improving a simple PHP form
    ... Other browser information, ... To the following PHP code which is posted to by a normal form: ... if you get an Bad referer error ... echo "Sorry, an error occurred and the message could not be sent. ...
    (alt.php)