Re: [PHP] header("Location:blah...") - passing variables

2001-12-04 Thread Miles Thompson
In a revised scheme for a customer I'm doing # 3. User can come into any page, a bit of PHP at the top does this: starts session registers "origin" assigns PHP_SELF to $origin checks to see if another session var is set and directs to logon page if not if( !session_is_registered( "member_id"

Re: [PHP] header("Location:blah...") - passing variables

2001-12-04 Thread J Smith
I'd recommend urlencoding those variables if you're going to do it that way, otherwise you may get some non-sense characters resulting in a bad URL. J Jim wrote: > > There are many different ways to do this ... > > 1. Have the same PHP script that validates generate the login page. > This

RE: [PHP] header("Location:blah...") - passing variables

2001-12-04 Thread Dan McCullough
It has been my idea to make a function, and pass the fields, then register a global feedback var and then check one by one each required field, or what ever you are trying to verify in the fields. function formCheck ($username,$password,$smellycat) { global $feedback, $username, $password; if

RE: [PHP] header("Location:blah...") - passing variables

2001-12-04 Thread Richard S. Crawford
My approach has been to pass an "error code" back to the original form. form.php: "); print("a buncha form crap"); if ($errcode==1) print ("Your user id is wrong. You suck"); if ($errcode==2) print ("Your password is wrong. You really suck"); print(" Then in

RE: [PHP] header("Location:blah...") - passing variables

2001-12-04 Thread Mark Charette
I cheat and just include the original form on error ... Almost all my input values are set to PHP variables in the form. The 1st time through none are set, so the values are blank. After submitting the form, I check for validity. If there are errors I mark the errors, generate an error string, an

Re: [PHP] header("Location:blah...") - passing variables

2001-12-04 Thread Valentin V. Petruchek
PEs, http://www.zliypes.com.ua - Original Message - From: "Lee Philip Reilly" <[EMAIL PROTECTED]> To: "PHP List" <[EMAIL PROTECTED]> Sent: Tuesday, December 04, 2001 7:46 PM Subject: [PHP] header("Location:blah...") - passing variables > Hi, > > I wo

Re: [PHP] header("Location:blah...") - passing variables

2001-12-04 Thread Jim
There are many different ways to do this ... 1. Have the same PHP script that validates generate the login page. This way the script always has the correct data and you don't need to pass anything. 2. Header("Location: login.php?err=$err&user=$user&pass=$pass"); This will work, but the bad pa

[PHP] header("Location:blah...") - passing variables

2001-12-04 Thread Lee Philip Reilly
Hi, I wonder if someone could tell me whether or not the following is possible? I have an HTML form which passes a username and password to a PHP script for validation. If either is not valid, I would like it to return to the previous page - carrying with it a variable plus the submitted form in