php-general | 2000071
Date: 07/12/00
- Next message: Boaz Yahav: "[PHP] RE: [PHP-DB] Adding an DATETIME as a string to a mySQL databse... ."
- Previous message: Mattias Hedman: "[PHP] Adding an DATETIME as a string to a mySQL databse...."
- In reply to: Jeroen Wesbeek: "[PHP] flushing formdata / flushing the client to prevent resubmitting formdata ?"
- Next in thread: Richard Lynch: "Re: [PHP] flushing formdata / flushing the client to prevent resubmitting formdata ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Its easy, take this as an example (its called index.php):
<HTML>
<BODY>
<?
if ($newrecord) {
mysql_query( "......" );
Header( "index.php" );
}
?>
<FORM>
<INPUT NAME=newrecord>
<INPUT TYPE=submit>
</FORM>
</BODY>
</HTML>
The header line in the middle makes the page load again without the
$newrecord variable. That way, if the user refreshes, it'll simply load
index.php again.
Hope im right :-)
Regards,
David Garcia Watkins
----- Original Message -----
From: "Jeroen Wesbeek" <J.Wesbeek <email protected>>
To: <php-general <email protected>>
Sent: Wednesday, July 12, 2000 10:01 AM
Subject: [PHP] flushing formdata / flushing the client to prevent
resubmitting formdata ?
> Hi,
>
> Is there any way of preventing form-data being resubmitted after hitting
> F5/refresh in your client?
>
> Ofcourse you can create a warkaround by giving a form a random number or
> something and check
> if this number has already been submitted in the script that handles the
> form data, but I'd rather
> see if there's a way to flush the client as soon as script is run which
> processes this data.
>
> So.. is there some kind of HTTP header which you can send to the client to
> make sure the data
> won't get re-submitted after refreshing?
>
> Grtz,
>
> Jeroen
>
>
> Jeroen Wesbeek
> Webdevelopper
> DoWebWeDo
> St. Jacobsstraat 16
> 3500 AK Utrecht
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Boaz Yahav: "[PHP] RE: [PHP-DB] Adding an DATETIME as a string to a mySQL databse... ."
- Previous message: Mattias Hedman: "[PHP] Adding an DATETIME as a string to a mySQL databse...."
- In reply to: Jeroen Wesbeek: "[PHP] flushing formdata / flushing the client to prevent resubmitting formdata ?"
- Next in thread: Richard Lynch: "Re: [PHP] flushing formdata / flushing the client to prevent resubmitting formdata ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

