Page 2 of 2
Re: Validating Users
Posted: Mon Feb 27, 2012 2:35 pm
by Pavilion
I just looked up Header() function. Correct me if I'm wrong, but in simplistic terms, do header functions allow for "remembering data" from one page/file to the next? I know that question probably slaughtered general terminology, but I'm asking the only way I know how.
Pavilion
Re: Validating Users
Posted: Mon Feb 27, 2012 2:41 pm
by temidayo
To retain the initial information, you have 3 options
1. Do not use the redirect function, display the error information and use javascript history.go(-1)
2. Store the information in session($_SESSION), then u can use the redirect function and still get back the user's data
3. in the redirect url, you can contruct user information as query strings, then get them back using the $_GET variable
and lastly, you can merge your files, put the code in register_post.php on top of your html file, then check for a POST BACK
or you can just include the register_post into the html file, that means you will rename your file to .php. In this last case
you do not need a redirect function
Re: Validating Users
Posted: Mon Feb 27, 2012 3:18 pm
by social_experiment
Pavilion wrote:But... I'm not sure yow to use this function.
You place it in the contact form; it will have to be a .php file to be able to parse the php code. The code checks if the value of the field has been set and if so it will echo the value into the html form.
Pavilion wrote:I just looked up Header() function. Correct me if I'm wrong, but in simplistic terms, do header functions allow for "remembering data" from one page/file to the next? I know that question probably slaughtered general terminology, but I'm asking the only way I know how.
From the understanding i have of the function, no
header() doesn't remember data;
header() is used to send a raw HTTP header.