PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 1st, 2012, 06:09 AM
zakia zakia is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 1 zakia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 50 sec
Reputation Power: 0
stop duplicate entry to db on refresh the page

Stop to re enter data into db after refresh the browser
i used header (redirect to page ) but wen user press back button from browser and submit button is clicked data is entered again to db

Reply With Quote
  #2  
Old November 1st, 2012, 06:31 AM
badger_fruit's Avatar
badger_fruit badger_fruit is offline
Confused badger
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2009
Location: West Yorkshire
Posts: 762 badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level)badger_fruit User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 5 h 28 m 2 sec
Reputation Power: 339
Then do a check to see if the data already exists before the INSERT
Comments on this post
ManiacDan agrees!
__________________
The number for UK Emergencies is changing, the new number is 0118 999 881 999 119 7253

"For if leisure and security were enjoyed by all alike, the great mass of human beings who are normally stupefied by poverty would become literate and would learn to think for themselves; and when once they had done this, they would sooner or later realise that the privileged minority had no function and they would sweep it away"
- George Orwell, 1984

Reply With Quote
  #3  
Old November 2nd, 2012, 06:28 AM
Aayudh Aayudh is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2010
Posts: 67 Aayudh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 44 m 50 sec
Reputation Power: 3
Isn't using primary key is a solution for this? Though I am not expert of programming but using primary key can avoid duplication in the same field.
__________________
Host.co.in - Web Hosting India | Cheap Windows VPS | Reseller Web Hosting

Reply With Quote
  #4  
Old November 2nd, 2012, 09:04 AM
tech0925 tech0925 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2011
Posts: 306 tech0925 User rank is Corporal (100 - 500 Reputation Level)tech0925 User rank is Corporal (100 - 500 Reputation Level)tech0925 User rank is Corporal (100 - 500 Reputation Level)tech0925 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 18 h 23 m 55 sec
Reputation Power: 5
Well this one would be kind of hard to answer without knowing the db table structure and what is being entered. However, you do need to have the form check to see if the db already contains the update from the user.

Again,

if you provided your code and db structure we would be able to help come up with a good solution for you.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > stop duplicate entry to db on refresh the page

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap