Jump to content
Stef's Coding Community
Sign in to follow this  
paulc12@mindspring.com

Problem involving a form

Recommended Posts

Something happened today involving an HTML form on a website I manage and I don't know how it could have happened. The cause of the problem doesn't seem like a problem with the form itself but maybe a symptom of something else happening. The HTML form is used for class registration. I last updated the webpage and form on 5/16. Today (on 5/23) I received a registration form email from the form, however the options selected were they way they looked prior to 5/16, not matching the current webpage on the server. It's as if there are two webpages, the current webpage and the previous version of the webpage, and the person completed the previous form/webpage. But there is only one form file on my website.

Share this post


Link to post
Share on other sites

I supose that it's possible that the user opened a cached version of the page, so the form sent the email with the data from that old page's code.

 

If you code the form action to a separate PHP process page and have the form data format for the email in that page, there is no risk of a user using an old code as the form will have to use the latest version of the PHP process page on your server.

Share this post


Link to post
Share on other sites

Thanks for the reply and suggestion. I think you are right, the user opened a cached version of the page and sent the email with data from the older page. I was able to do a bit of a test today that seems to indicate that's what happened.

 

It sounds like PHP would be a very good way to go. I haven't ventured into PHP yet so that might be a bit much for me at this time. Would it be possible to do something with javascript that would force a webpage to refresh when a user visits the webpage? Would a forced refresh of some sort override a local cached file? Just wondering if there would be options to PHP. Thanks for your time.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...