RE: [PHP] Validation and session variables

2004-10-28 Thread Graham Cossey
See in-line comments... -Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] Sent: 28 October 2004 08:54 To: [EMAIL PROTECTED] Subject: [PHP] Validation and session variables I guess my resolution was a fluke. Recap: Adding validation kills my session variables

RE: [PHP] Validation and session variables

2004-10-28 Thread Stuart Felenstein
--- Graham Cossey [EMAIL PROTECTED] wrote: I think we need to know what happens when this function returns the user to the script upon finding an error. Are all the form field values passed back? Doesn't seem that they are. I tripped an error on page1 , had an echo set for the first

RE: [PHP] Validation and session variables

2004-10-28 Thread Stuart Felenstein
--- Graham Cossey [EMAIL PROTECTED] wrote: I think we need to know what happens when this function returns the user to the script upon finding an error. Are all the form field values passed back? Does it do anything at all with the session? Does it pass the SID? I want to append my

Re: [PHP] Validation and session variables

2004-10-28 Thread Jason Wong
On Thursday 28 October 2004 09:24, Stuart Felenstein wrote: --- Graham Cossey [EMAIL PROTECTED] wrote: I think we need to know what happens when this function returns the user to the script upon finding an error. Are all the form field values passed back? Does it do anything at all with

RE: [PHP] Validation and session variables

2004-10-27 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] Sent: 27 October 2004 00:01 Having some odd behaviour. First , let me mention this is a multi

RE: [PHP] Validation and session variables

2004-10-27 Thread Stuart Felenstein
See inline: --- Ford, Mike [EMAIL PROTECTED] wrote: The only circumstance under which I can think this might happen is if the session id is not being propagated by cookie -- either because they're blocked in the browser, or because you have them switched off in php.ini. They are not

Re: [PHP] Validation and session variables

2004-10-27 Thread Marek Kilimajer
Stuart Felenstein wrote: Yes the session variables are set with $SESSION[''}. The way it works is the variable gets set on the follwing pages: So, example on page 1: I have this user input field: td width=172input name=ListingName type=text id=ListingName maxlength=20 //td On the following page

Re: [PHP] Validation and session variables

2004-10-27 Thread Stuart Felenstein
Yes I do have session_start on every page at the top. Stuart --- Marek Kilimajer [EMAIL PROTECTED] wrote: Stuart Felenstein wrote: Yes the session variables are set with $SESSION[''}. The way it works is the variable gets set on the follwing pages: So, example on page 1: I have

RE: [PHP] Validation and session variables

2004-10-27 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] Sent: 27 October 2004 12:18 --- Ford, Mike [EMAIL PROTECTED] wrote: header(Location:

RE: [PHP] Validation and session variables

2004-10-27 Thread Stuart Felenstein
Okay, I altered the code. Same thing, session variables gone. I then deleted the session only cookie. Also took the rule out in the browser , so browser is accepting all cookies from site. Still no change. Not to be redundant but here is the code again:(I xxx'ed out some fields in the restrict

Re: [PHP] Validation and session variables

2004-10-27 Thread Chris Shiflett
--- Stuart Felenstein [EMAIL PROTECTED] wrote: Having some odd behaviour. First , let me mention this is a multi page form using session variables. (This might be important) So I am doing a page by page validation, and have tried putting the code before session_start or after. Either way

Re: [PHP] Validation and session variables

2004-10-27 Thread Stuart Felenstein
--- Chris Shiflett [EMAIL PROTECTED] wrote: So, the first thing to try is using a proper Location header: header('Location: http://example.org/success.php'); Hope that helps. Chris Thank Chris , but met with same behaviour. 2 Questions: 1- Should I drop the $url line ? I tried both

Re: [PHP] Validation and session variables

2004-10-27 Thread Philip Thompson
Stuart, On Oct 27, 2004, at 6:57 AM, Stuart Felenstein wrote: Not to be redundant but here is the code again:(I xxx'ed out some fields in the restrict access line so they are not public) ?php Put session_start() here! //Connection statement require_once('Connections/MYSQLWH.php'); //Aditional

Re: [PHP] Validation and session variables

2004-10-27 Thread Jason Wong
On Wednesday 27 October 2004 11:31, Stuart Felenstein wrote: Please do not top post. Yes I do have session_start on every page at the top. As I have pointed out in a previous thread and Mike has pointed out in this thread you MUST use session_write_close() before you do a redirect. --

Re: [PHP] Validation and session variables

2004-10-27 Thread Stuart Felenstein
Okay, first, sorry, but what is top post? Writing before the reply or after ? Second, I'm not entirely sure where the session_write_close() belongs, because here below, isn't this a redirect? back to page2 if there are validation errors: if ($WAFV_Errors != ) {

Re: [PHP] Validation and session variables

2004-10-27 Thread Chris Shiflett
--- Jason Wong [EMAIL PROTECTED] wrote: As I have pointed out in a previous thread and Mike has pointed out in this thread you MUST use session_write_close() before you do a redirect. Are you certain? If this is true, it is a bug in PHP, and we should fix it. Chris = Chris

Re: [PHP] Validation and session variables

2004-10-27 Thread Chris Shiflett
--- Stuart Felenstein [EMAIL PROTECTED] wrote: Thank Chris , but met with same behaviour. Well, it was certainly a problem, so at least it's one less thing to worry about. :-) 2 Questions: 1- Should I drop the $url line ? I tried both ways , no change though. It doesn't matter. Your method

Re: [PHP] Validation and session variables

2004-10-27 Thread Chris Shiflett
--- Stuart Felenstein [EMAIL PROTECTED] wrote: Okay, first, sorry, but what is top post? Writing before the reply or after? Top posting is writing your reply above what you are replying to. It's really not worth discussing the advantages of bottom posting, but I will say that trimming your

Re: [PHP] Validation and session variables

2004-10-27 Thread Jason Wong
On Wednesday 27 October 2004 14:36, Chris Shiflett wrote: --- Jason Wong [EMAIL PROTECTED] wrote: As I have pointed out in a previous thread and Mike has pointed out in this thread you MUST use session_write_close() before you do a redirect. Are you certain? If this is true, it is

Re: [PHP] Validation and session variables

2004-10-27 Thread Greg Donald
On Wed, 27 Oct 2004 07:51:48 -0700 (PDT), Chris Shiflett [EMAIL PROTECTED] wrote: It's really not worth discussing the advantages of bottom posting, but I will say that trimming your posts makes people not mind so much. :-) I love discussing the advantages of documented standards, and 'known

Re: [PHP] Validation and session variables

2004-10-27 Thread Stuart Felenstein
--- Chris Shiflett [EMAIL PROTECTED] wrote: On each page, it might be good to add some debugging information near the top (where session_start() is): ?php session_start(); echo 'pre' . htmlentities(print_r($_COOKIE, true)) . '/pre'; echo 'pre' . htmlentities(print_r($_GET, true)) .

Re: [PHP] Validation and session variables

2004-10-27 Thread Stuart Felenstein
--- Chris Shiflett [EMAIL PROTECTED] wrote: This is most likely due to your malformed Location header. It requires an absolute URL, and some browsers (notably several versions of IE, but there may be others) do not send the proper Cookie header when requesting the new URL if you use a

RE: [PHP] Validation and session variables

2004-10-27 Thread Graham Cossey
--- Chris Shiflett [EMAIL PROTECTED] wrote: On each page, it might be good to add some debugging information near the top (where session_start() is): ?php session_start(); echo 'pre' . htmlentities(print_r($_COOKIE, true)) . '/pre'; echo 'pre' . htmlentities(print_r($_GET,

Re: [PHP] Validation and session variables

2004-10-26 Thread Ligaya Turmelle
Without seeing the code: Try putting session_start() at the VERY beginning. Also try having the action go to the page itself ($PHP_SELF or putting in the path). Is the session variables being set using $SESSION['']? Respectfully, Ligaya Turmelle Stuart Felenstein wrote: Having some odd

Re: [PHP] Validation and session variables

2004-10-26 Thread Stuart Felenstein
Yes the session variables are set with $SESSION[''}. The way it works is the variable gets set on the follwing pages: So, example on page 1: I have this user input field: td width=172input name=ListingName type=text id=ListingName maxlength=20 //td On the following page (page 2):