> -----Oorspronkelijk bericht----- > Van: Eugene Lee [mailto:[EMAIL PROTECTED] > > On Thu, Nov 20, 2003 at 11:22:02AM +0200, Veress Berci wrote: > : > : Scuse me, if I write some totally dumb thing. > : I am quite new to PHP and programming, and maybe I'm not understanding > : the question, but: > : > : What if you assign a value to every form field like this: > : > : <input type="text" name="something" value="<?php echo $something; ?>"> > : > : or - safer, with register_globals off: > : > : <input type="text" name="something" value="<?php echo > $_POST['something']; > : ?>"> > > Actually, you can do one more thing: > > <input type="text" name="something" value="<?php echo > htmlentities($_POST['something']); ?>"> > > : Again, please apologize, if i'm stupid. > > Ummm, what is the question? :-) >
In some context it turned out most handy for me to fill in the form values by running a simple javascript function after pageload. Did it by just looping through the $_POST global array, and simple js tricks. Reason in this was that the FORM html came from a CMS system, but it might be the best solution in other cases too. Another related thing: does anybody know of a PHP module providing most of the CGI.pm (perl) functionalities for generating HTML pages? When perling, that one DOES automatically fill the values of your form elements based on the previously posted or getted values. (or you could post parse your generated (form) HTML code with php, setting the values .. ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php