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
Set the form receiver to $PHP_SELF. When data is posted (use $HTPP_POST_VARS to check if is) check it for correctness. If everything is ok, use Header("Location: work_for_authorized.php") otherwise show the current (i.e. login page) with $user, $pass available... Zliy PEs, http://www.zliypes.com.

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