"Jon Thompson Coon" <[EMAIL PROTECTED]> wrote in message
> I don't want to ask all these silly questions constantly time, but being
> lazy overcomes the urge not to do so.
> Having a page somethin/somewhere/index.php?do=this&and=that. This page
> does some updating and database queries. Hitting the reload button makes
> these things happen again (obviously). My question is, what are the
> usual ways of dealing with this problem?
> I don't want to separate my code into separe files, i.e. linking into a
> script that does the updating and redirects to the original page without
> the do=this&and=that part.

... so make the two pieces the same file... have the script redirect to
itself minus the parameters.

========= xyz.php ===========
    if (isset(do)) {
        do database stuff
        header("Location: xyz.php?submitted=true");
    else if (isset(submitted)) {
        thanks for submitting
    else {
        show form

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to