> When a person submits a form that inserts a record into the database, if
> they then refresh the page that comes up after the submit, the record will
> be submitted a second time.  I suppose this is due to the fact that the
> subroutine that is called with the submit contains both the write to
> database bit and the view bit. So refreshing causes a repeat of both items.
> 
> How can I do this without that problem?
> 
> Thanks in advance,
> Dawn H

  Two possible suggestions:

1) Provide a unique index field and catch the duplicate error if they
try to resubmit the form. Then you can send them a nice "Don't do that!"
message.

2) After the form is submitted redirect them to a second "Thanks!" page.
They can reload that page all they want.

Pete
-- 
http://www.elbnet.com
ELB Internet Services, Inc.
Web Design, Computer Consulting, Internet Hosting

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to