Re: function not working after header call

From: Date: Tue, 08 May 2001 15:52:54 +0000
Subject: Re: function not working after header call
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-51916@lists.php.net to get a copy of this message
Well, what can I say??? Magic windows.... Reboot the system or post a message and it works! johannes ""Johannes Janson"" <johannes.janson@gmx.de> schrieb im Newsbeitrag news:9d93c3$7d8$1@toye.p.sourceforge.net... > Hi, > > I just don't get it...I have a form where the user enters name, surname > and a personal code. The action page checks for correct input which > is only letters for the two names and only numbers for the code. > If there is a wrong input in one of the fields a variable is set > which is then (amongst others) passed in the URL to the page containing > the form. > > formscript.php?code=1&name=1&surname=1&...... // for all three fields wrong, > if they are ok they aren't passed > > Now in order to highlight the fields with worng input I worte a > function. > > function wrong_input($var) > > global $var; > echo isset($var) ? "<font face=\"Times\" size=\"2\" > color=\"#FF0000\">" : "<font face=\"Times\" > size=\"3\" color=\"#000000\">"; > } > > This function is called in the <td> like this: > <td><?php wrong_input($code); ?>Code</font></td> > > It is executed the first time but if the input is wrong and the user is sent > back to the form page it is not. > Desperately trying to get it to work I tried lots of combinations like using > print in the function or use > echo function($var) in the <td> but nothing worked out. > > I'm completely stuck. > Any hlep is greately appreciated > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#51916) next »