PHP Form Help
- Started
- Last post
- 3 Responses
- vaxorcist0
try adding a random number or millisecond time-stamp in a hidden field, and/or some similar form of browser-cache breaker..... send that field with the form....
Does this issue happen with all browsers, or only IE on Winblows?
- aliastime0
Thanks miko... looking into this now
- :) Always trickiest when it only 'sometimes' does it. Nail precisely when and you're mostly there.mikotondria3
- mikotondria30
When the server generates a session and variables, then they're uniquely tied to the browser session of each user; in theory you could run 1000s of sessions with the same variables on the same box, and it should work fine.
That's what I'd be thinking of before I tried to debug this arrangement - you need to isolate exactly when of the 'sometimes' you're getting this error. Echo out the $_SESSION['tkn'] and $_POST['tkn'] values in that section where you throw the error, see why and how they're different:
Above the echo "Invalid data!", see:
http://pastebin.com/vUeekjxb
- aliastime
Probably a long shot here but...
I have a PHP contact form I've been using for years. I don't know PHP, I just know the form works. Now, I'm using the same form on two pages of the same site. SOMETIMES when the client submits either form, they get the "Invalid data!" echo.
I thinking this maybe both forms are using the same variables. Any idea on what I'd need to change in my code to make each form unique?
Would changing 'step' or 'tkn' make one of the forms unique? Any input would be greatly appreciated!