RE: [PHP-DB] MySQL Returns Error
| From: | Matt Schroebel | Date: | Tue, 05 Aug 2003 20:03:44 +0000 |
| Subject: | RE: [PHP-DB] MySQL Returns Error | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-29696@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Jeff [mailto:jroth1@telus.net]
> Sent: Tuesday, August 05, 2003 3:52 PM
> To: php-db@lists.php.net
> Subject: Re: [PHP-DB] MySQL Returns Error
>
>
> Oops, my mistake, it's not a blank entry - it re enters the
> last entry.
>
> I can hit F5 or click refresh 1000 times and it will enter
> the last entry
> 1000 times.
The simplest thing to do is do a header('Location:
http://your.site.com/someOtherPage.php')
after the insert. That way the
page displayed isn't the one someone will hit refresh on. Otherwise,
perhaps you should do a select to see if the value is already in the db,
and if so, don't insert it again, but perhaps update it, or ignore it.