RE: [PHP] Refresh-avoidance
| From: | Daevid Vincent | Date: | Tue, 27 Jun 2000 21:01:55 +0000 |
| Subject: | RE: [PHP] Refresh-avoidance | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-3449@lists.php.net to get a copy of this message | ||
> If you are using a database without many features (mysql), then it
> should be just as easy (although maybe a bit more tedious) to
> implement this check into your code. Basically, before every INSERT,
> you could first do a SELECT to see if the same data exists. There are
> many different ways to do it (such as even setting a cookie or session
> variable that flags that the user has already updated), so you can
> choose whatever works best in your case.
you could also look into "REPLACE INTO"... if that lends itself to your
application, this way if a record is being written twice, you could make it
so it only writes to the same record again. dig?