Forum Moderators: mack

Message Too Old, No Replies

weird stuff happening in server log....need help

getting 200 on form redirect script, but user didnt redirect?

         

kstprod

6:14 pm on Oct 30, 2002 (gmt 0)

10+ Year Member



I found the following in my logs....it's a form I have set up that emails me the contents and then redirects the user....problem is this...I never got this email. I tested the script myself, filled out the form, got redirected, and got the email, then went back and checked my logs, and it resulted in a 302 for me, but as you can see below, this user got a 200. I think it was a normal surfer, as they came in from a SE and traveled through my site, submitted this form, and then somehow skipped a few steps and landed on another page - not my redirect page.

How did this person get to another page? And why did it result in a 200 code, rather than the 302 that I got? And while I'm at it, why didn't I get the email? :)

user-somewhere.net - - [30/Oct/2002:10:48:04 -0500] "POST /cgi-bin/script.cgi HTTP/1.1" 200 975 "http://www.mysite.com/form.html" "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)"

Thanks so much in advance!

Karen

bobriggs

6:25 pm on Oct 30, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I guess it might depend upon your script; you know it better than anyone here does.

Does the script ALWAYS return a redirect? Or if it detects an error, might it output something else? I have a bunch of scripts that can output a location header or another page, depending upon the input.

kstprod

6:47 pm on Oct 30, 2002 (gmt 0)

10+ Year Member



Thanks for responding....I'll do my best to explain the script, as I'm not too techinically gifted...lol

user fills out form....if something required isn't filled out, it goes to a new page and says "Error: the following form fields need to be filled out. Please use your browsers back button to return to the form". (This was all setup with the script itself when I got it) Also, I have a little javascript alert message that pops up when the submit button is pressed, to tell my users that they are about to be redirected and gives a reminder, and they must click "OK" to continue (only option is OK, theres no cancel)....then finally it submits the form, and redirects them to a specific page. This is set to happen always. Then a few seconds later, I get the email with the contents of the form.

Maybe I should set something up that is easier? I just don't get why I didn't get emailed the users form info, unless it was because they didnt fill something out and got the error page and just decided NOT to fill out the form and go to a different page? Would that explain the 200 code?

Alternative ideas are welcome if you have a better idea for what I should do :) I was just afraid I did something wrong and I can't afford to have errors on this particular form because it is required for a sale to complete.

Thanks a bunch for helping

Karen

bobriggs

6:55 pm on Oct 30, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It sounds like the page that says:

Error: the following form fields need to be filled out. Please use your browsers back button to return to the form

Is a regular output of the script, not redirected. Therefore, the 200 response would be generated. You can tell for sure if the address in your browser's address bar is the name of the script (in your <form>; the action URL); - Generate an error for yourself or leave something blank - What do you get?

And if that's not it, try turning off javascript and force an error. I don't know if you have any .js checking, but it's also possible that the user was surfing without .js turned on.