Cindy, read my reply to this.  You are mistaken.  There is actually a way 
to make a single script do all kinds of different operations.  I have 
single scripts that show a list of records, add a new record, update a 
record, and delete a record, all in the same script.  This is more 
efficient to do because if the webserver is configured correctly, it will 
cache the script thereby preventing re-compilation of the script code.

-Ken

At 12:18 AM 6/6/01 -0700, Cindy wrote:

>"Dawn H" writes:
>  >I've written a couple of scripts and have a thing that I haven't quite
>  >figured out. If anyone can shed light on this, I'd appreciate it.
>  >
>  >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?
>
>I was finally forced to add a check that there wasn't already an
>identical record (using a minimum comparison set of fields) before
>inserting the record.  There really isn't any way to prevent dingbats
>from refreshing, so...  I CYA by emailing a copy of the record/element
>values to myself when I refuse to add it in, but I havne't had any
>spurious refusals so far.
>
>--Cindy
>
>---------------------------------------------------------------------
>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


---------------------------------------------------------------------
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