Re: Form Variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 22 October 2003 15:06, Ng Hwee Hwee wrote:

> got an urgent problem.. it's regarding forms.
>
> my system works like this..
> 1) user on page1 fills up form
> 2) upon clicking submit button, it will go to verify.php to verify if the
> entries are correct
> 3) if there is any errors, verify.php brings user back to page1 with all
> the errors listed beside the incorrect field entries
>
> my problem is: how do i make the user's browser remember the data they
> filled up at page1? i tried header("Cache-control: private"); but to no
> avail..

You don't. Your application has to remember the filled in values and when 
presenting page1.php again it pre-populates the form with the 'remembered' 
values. The easiest way to remember the values is to use sessions.

Or alternatively you can one of the dozens of form validation classes that are 
available (www.phpclasses.org et al) to do the donkey work for you.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
Famous quotations:
	" "
		-- Charlie Chaplin

	" "
		-- Harpo Marx

	" "
		-- Marcel Marceau
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux