Thanks guys this forum is going to get me in trouble. It is so convenient I keep asking questions too soon. After submitting the amendment to the original question I thought of the solution of setting a session variable and then clearing it before and after the submittal page. I'll work the gray matter a little harder next time before asking. Thanks again.
Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 01, 2002 8:58 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Disable refresh? > Anyone know of a method of preventing a user from refreshing a page. I > get multiple updates with the same information in my database... Hello! You can prevent it multiple ways. Two common solution: - When creating form, add a unique id to it in a hidden field. After succesful insert put that id into a container table, what stores used ids. Before inserting, check the presence of that id in that container. You can make unique ids with php's uniquid() function, or if mod_unique_id compiled into Apache, you can use $_SERVER['UNIQUE_ID'] too. Store expire dates too with that ids to be able delete old ids with a cronjob. - Another way: this is easier, but not too elegant. After inserting data, send a location header to browser to redirect it from that form-processor page to an another. After that, refreshing affects that page. Heilig (Cece) Szabolcs [EMAIL PROTECTED] - http://phphost.hu -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php