473,383 Members | 1,846 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,383 software developers and data experts.

page refreshing allows duplicates to be inserted again and again

I have a form with some user details like first name , last name, email and posting them to the second page , here my database code runs and insertion done , , ,and redirection to signin.php , works fine , but after entering the firstform details it openini second form, , when i refresh the browser the insertion performed again, l how can i stop the resubmissoin of the page
Apr 28 '14 #1
3 1185
Rabbit
12,516 Expert Mod 8TB
Check for whether or not that row exists before inserting.
Apr 28 '14 #2
Dormilich
8,658 Expert Mod 8TB
l how can i stop the resubmissoin of the page
set appropriate unique (composite) keys in the DB.
Apr 29 '14 #3
koharu
10
Both of the above are great ideas, and should be followed as a standard. You can also add header("Location: somewhere.php"); which will quickly redirect a person on successful completion of inserting into a Database, pressing the back button will take the person back to the form.
Another option is to use jQuery to post the data, and lock the form so no double clicking on buttons will cause issues.
May 5 '14 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: bss2004 | last post by:
Hi- I have a couple of pages on my asp.net site that take a few minutes to process after the user clicks the submit button. An example is a page that kicks off a Crystal Report that is printing a...
6
by: LisaMark0822 | last post by:
I have an asp page that gets populated from a SQL Server database. Normally when the page gets displayed it displays the current record from a select statement that can return lets say seven...
1
by: rayt | last post by:
I’m relatively new to XSLT and must admit I’m finding it refreshing, but every now and again something comes along which floors me. Maybe it’s the old imperative language background that is hard to...
2
by: Jesper | last post by:
Last week I posted this for the first time. However, I didn't get any useable solution to my problem. I'm very keen on getting this problem solved, so please excuse me for trying again. I'll try to...
4
by: Mike | last post by:
On my web app I allow the user to enable or disable the refreshing of the page. I notcied that if the browser window is minimized the page does not refresh, or if it sits a long time without any...
0
by: zEE | last post by:
The solution to the problem is let say i have a function private void btn_delete_click(object Sender, System.EvenArgs e) { //logic to perform on button click
1
by: srinivasyadavkota | last post by:
Hi Experts here, Pls help. when I disable the button using the code document.getElementById("mybutton").disable=true; it is disabling perfectly but when the page gets refreshed again it...
1
by: pravinnweb | last post by:
i am applying css for jsp page is looking fine at first time downloading in browser but when i refresh the page some of css not applied for pages like border and margin and padding property . please...
2
by: boss1 | last post by:
hello everyone, i need your help. i m using update query for a table to update data. i want to insert data when submit button is pressed but when page is refeshed the table data is...
2
by: divyadas | last post by:
Here am using Autopostback true with drop down lists control
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.