Wrox Programmer Forums
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 22nd, 2003, 01:59 AM
Authorized User
 
Join Date: Nov 2003
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Disabling Refresh

Hello,
I have a page that updates records in a database however when the user his refresh in the browser the record is updated again. This also happens on pages that insert unless i check for whether the primary key (unique string not an int)already exists,

Is there any way to prevent the data from being updated/entered again

Thanks Chris

 
Old December 22nd, 2003, 01:00 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can store a session variable for each page that makes a query in the database. If the session variable does NOT exist, create it and perform your query. If the variable DOES exist, then you know the query has already been performed.

Take care,

Nik
http://www.bigaction.org/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Refresh GridView Using Refresh Button msbsam ASP.NET 2.0 Professional 0 December 6th, 2006 05:57 AM
Disabling the refresh command anukagni Access 0 January 16th, 2006 06:58 AM
Disabling refresh and going to previous page johnsonlim026 ASP.NET 1.0 and 1.1 Basics 3 August 8th, 2005 11:56 AM
disabling refresh shruthi Beginning PHP 0 November 16th, 2004 05:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.