473,385 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Error Trapping the dreaded refresh

Hi All

My problem basically is as follows:

1) User enters their details to create a new account in my db.

2) They press the submit, the system successfully creates their new account
and then displays a page saying 'well done you've created your new account'.

3) The doofus (or clever clogs) clicks the Refresh button, which in turn
submits the details back to the db and creates a duplicate entry in my db.
I don't have a duplicate account num, as the system takes the max last one
and adds one to it so really no errors are generated, but it does mean that
they have 2 accounts now.

As mentioned above, this scenario crops up when doing a New Account page and
when they've just posted their order via the shopping cart final page (shall
we say). The latter worries me because duplicate orders would cause a lot
more hassle.

I realise this may be a common problem, but I'm not sure what the best
method is.

Your help/advice on how to handle this would really be appreciated.

Rgds

Laphan


Jul 19 '05 #1
2 1305
Hi,

Usualy, instead of writing the answer at the end of the server-side
processing it's recommended to redirect the response this way :

<%
set val ...
val.Exec...
'Ok it's done

response.redirect "ThisIsDone.htm"
%>

regards,

"Laphan" <ne**@DoNotEmailMe.co.uk> a écrit dans le message de
news:40********@127.0.0.1...
Hi All

My problem basically is as follows:

1) User enters their details to create a new account in my db.

2) They press the submit, the system successfully creates their new account and then displays a page saying 'well done you've created your new account'.
3) The doofus (or clever clogs) clicks the Refresh button, which in turn
submits the details back to the db and creates a duplicate entry in my db.
I don't have a duplicate account num, as the system takes the max last one
and adds one to it so really no errors are generated, but it does mean that they have 2 accounts now.

As mentioned above, this scenario crops up when doing a New Account page and when they've just posted their order via the shopping cart final page (shall we say). The latter worries me because duplicate orders would cause a lot
more hassle.

I realise this may be a common problem, but I'm not sure what the best
method is.

Your help/advice on how to handle this would really be appreciated.

Rgds

Laphan

Jul 19 '05 #2
Laphan, please don't multi-post.

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Laphan" <ne**@DoNotEmailMe.co.uk> wrote in message
news:40********@127.0.0.1...
Hi All

My problem basically is as follows:

1) User enters their details to create a new account in my db.

2) They press the submit, the system successfully creates their new account and then displays a page saying 'well done you've created your new account'.
3) The doofus (or clever clogs) clicks the Refresh button, which in turn
submits the details back to the db and creates a duplicate entry in my db.
I don't have a duplicate account num, as the system takes the max last one
and adds one to it so really no errors are generated, but it does mean that they have 2 accounts now.

As mentioned above, this scenario crops up when doing a New Account page and when they've just posted their order via the shopping cart final page (shall we say). The latter worries me because duplicate orders would cause a lot
more hassle.

I realise this may be a common problem, but I'm not sure what the best
method is.

Your help/advice on how to handle this would really be appreciated.

Rgds

Laphan

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Nathan Bloomfield | last post by:
Hi there, I am having difficulty with a piece of code which would work wonders for my application if only the error trapping worked properly. Basically, it works as follows: - adds records...
3
by: windandwaves | last post by:
Hi Gurus Does anyone know how I set the error trapping to option 2 in visual basic. I know that you can go to tools, options and then choose on unhandled errors only, but is there a VB command...
13
by: Thelma Lubkin | last post by:
I use code extensively; I probably overuse it. But I've been using error trapping very sparingly, and now I've been trapped by that. A form that works for me on the system I'm using, apparently...
3
by: Smriti Dev | last post by:
Hi There, I have the following code and when I try to run it, I get a type mismatch error. I would really appreciate your help with this. Thanks kindly, smriti --- Private Sub cmdOK_Click()
2
by: Keith Kowalski | last post by:
I anm opening up a text file reading the lines of the file that refer to a tif image in that file, If the tif image does not exist I need it to send an email stating that the file doesn't exist...
2
by: Captain Nemo | last post by:
I'm still using Office 2000 myself, but some of my clients have Office 2003. I've recently added a piece of code to create an instance of Word, open a document, fill in the blanks and become...
9
by: 47computers | last post by:
Pretty new to PHP, I recently started learning about error trapping. As of right now, I include the following into a page in my website: -------BEGIN PASTE-------- error_reporting(E_ERROR |...
2
by: Showjumper | last post by:
I have set a file based photo galery. Thumbnails are generated and saved to disk. Everything was working or so i thought until i found this problem. When you click a link to go to a gallery...
10
by: gary0gilbert | last post by:
An unusual spin to this recurring disk or network error in a Terminal Server environment. Access 2000, Terminal Server 2000, file server is windows 2000. All users have a separate copy of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.