| Posted by Domestos on 06/14/97 11:29 
Say a user inputs an invalid string into a field - say for example e-mail in a form on Page A...
 
 Validation is done on Page B. It notices that the e-mail is incorrect and
 informs the user and jumps them back to the form on Page A.
 
 To get the values the user had input in the e-mail and other fields on the
 form to re-display rather than a blank form I do the following...
 
 On Page B I set $_SESSION('back')=1 and set other variables like
 $_SESSION('name')=$name and $_SESSION('email')=$email
 
 on returning to PageA I check if $_SESSION('back') exists and if so set the
 $name and $email to the $_SESSION superglobals, if not I read the
 information in from a database. I then un-register $_SESSION('back') and the
 others...
 
 There must be a better way to do this!!!!
 
 Can anyone advise please? or point me to some text...
 
 I dont want to get into Classes and OO stuff just yet - unless it is the
 only way!
 
 --
 Thanks,
 Andrew Makinson
 www.buy-a-pixel.com
 [Back to original message] |