Re: Tracking vars

From: Date: Fri, 20 Oct 2000 16:53:42 +0000
Subject: Re: Tracking vars
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21431@lists.php.net to get a copy of this message
On Fri, 20 Oct 2000, Daniel Convissor wrote: > Hey Adrian: > > > doesnt seem to track the vars across all three. Ive taken > > a look at my PHP > > manual and from this I understand I should be using $HTTP_GET_VARS["My Vars"] > > but it doesn`t tell me how or where I should insert this on my page, anyone > > know? > > Check out HTML standards too on http://www.w3c.org/. > > Anyway, what you'll need to do is have hidden input elements on the second > and third forms holding the data from prior forms. Set the value="" > attribute of the input element by using your $HTTP_GET_VARS["MyVar"] or > $MyVars: > > echo "<input type=\"hidden\" name=\"MyVar\" > value=\"$MyVar\" />"; What do people have against single quoting? Personally, I get really tired of seeing all those escaped quotes. The same string looks much cleaner as echo '<input type="hidden" name="MyVar" value="' . $MyVar . '">'; and it's the same length. Or, if the input is part of a modest block of html (Say, more than 2 lines) it'd probably make the code easier to follow if you simpy escaped out of PHP for the time being. That way, the line could simply be <input type="hidden" name="MyVar" value="<?= $MyVar ?>"> Matt

« previous php.general (#21431) next »