Re: form values
| From: | Jeff | Date: | Mon, 02 Oct 2000 08:46:12 +0000 |
| Subject: | Re: form values | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-18259@lists.php.net to get a copy of this message | ||
Bryan,
Reposting all the variables as 'hidden' values should work. Also,
if your code is in a function, make sure the variables
you need are defined globally within the function, otherwise they
will be unset.
Also:
> <input type=hidden name='fname'<?php ">
> value='$f_name'>"; ?>
I don't think "value='$f_name'" will do anything useful without
an echo command, ie:
<input type=hidden name='fname' value='<?php echo $f_name?>'>
Jeff
bryan brown wrote:
>
> Ill continue posting this question in hopes to get
> a solution that works. I have a php page with a bunch
> of forms. The user inputs the values and the values
> are checked for validity in another php file like
> this:
>
> if (! (ereg("^[a-zA-Z ]+$", $f_name))){
> $errorflag1 = 1;
> $a = 1;
> include('userform.php3');
> }
>
> If there is an error, it goes back to that page.
> Otherwise, it goes to the next php page with more
> forms, which are also checked for correct values.
> I lose the values from the first form page and thus
> cannot insert into a db (because they cant be null).
> Most people suggested that hidden variables would
> remedy this. I have code like so, in the second form:
>
> <input type=hidden name='fname'<?php ">
> value='$f_name'>"; ?>
>
> These values are not saved though. The values from
> the first form are visible form the second form, but
> not after that. I can't use cookies or open files or
> session variables (php3). What can I do? I am
> desperate. Thank you.
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
> http://photos.yahoo.com/
>
> --
> 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