![]() | | ||||||||
| | #1 |
| Warrior Member Join Date: May 2007 Location: , , .
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
|
Hello all, I'm a learning php this year but i encounters some problems. One of them is about php value. The problem is how do i do to prevent a php file from resending the same values into the database whenever the page is refreshed? Anyone help? Thanks, Asep |
|
Please read the sig file rules | |
| | |
| | #2 |
| HyperActive Warrior Join Date: Jul 2007 Location: , , USA.
Posts: 187
Thanks: 0
Thanked 1 Time in 1 Post
|
Check the database and see if the data is there already. If it is, then do not enter it, if it is not then enter it.
|
| Felecan - Innovative Web Solutions For Small and Mid-size Companies!
| |
| | |
| | #3 |
| Advanced Warrior War Room Member Join Date: Oct 2006 Location: Ireland
Posts: 750
Thanks: 5
Thanked 34 Times in 24 Posts
|
You can use a cookie or session variable to determine if the current page has already been submitted to decide if you should do an insert or not. Sean |
| http://www.ViralPDF.com - The #1 PDF Rebrander since 2002 http://www.PdfPrinterPro.com - Create PDFs with Audio, Video and Flash inside http://www.PdfLocker.com - Lock & Encrypt your PDFs quickly & easily | |
| | |
| | #4 |
| HyperActive Warrior Join Date: Jul 2007 Location: , , USA.
Posts: 187
Thanks: 0
Thanked 1 Time in 1 Post
|
Cookies can be changed client side and sessions can be hijacked. If you need something solid then check on the server side and not the client side. Otherwise you will end up with duplicate values.
|
| Felecan - Innovative Web Solutions For Small and Mid-size Companies!
| |
| | |
![]() |
|
| Tags |
| duplicate, php, php value |
| Thread Tools | |
| |
![]() |