Resubmitting forms

Results 1 to 2 of 2

Thread: Resubmitting forms

  1. #1
    Alistair Guest

    Default Resubmitting forms

    We have pages which on submit write to a database then display results from a query on the next page. If you go back in the browser and change some info on the form, then submit again, it should add a new record to the database and display new results. It works most of the time, but if you do it quickly it displays the previous record, and there is no new record added, it seems there is some expiry parameter that i don't know about or am not using correctly. How do make it so every time you go back and make a change, the database is updated on submit? I want the previous info in the form when you go back.

  2. #2
    Join Date
    Dec 1969

    Default RE: Resubmitting forms

    it might be an idea to make the script slightly more complicated, as you are taking a bit of a cowboy approach to it at the moment. Maybe you should set a session varaiable of the user Id and just have a button saying edit which can take you through to new page where you can edit the details of the user (the same form but with values set to the records of the particular user, eg &#060;input type="text" name="name" value="&#060;%=RS("username")%&#062;"&#062; or somethign along those lines.<BR><BR>your system should work but it&#039;s unpredicable whether a database has updated immediately or not and if there are goingt o be other users using the system then you are asking for trouble.<BR><BR>If it&#039;s your intention to create a new record set every time the form is submitted then it should work fine, try response.writing the submitted variables and use a response.end so it doesn&#039;t actually enter the details, you can get alot of good information from using this approach and you should be able to see why the user isn&#039;t being submitted.<BR><BR>also if you have on error resume next in your script remove it and get some error checking on the go! ;p<BR>Hope this helps a bit<BR><BR>Toozious,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts