lists.zerezo.com
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
***BOGO*** Re: [PHP] unset($_GET['i'])
- Date: Thu, 4 Sep 2008 15:55:51 -0400
- From: "Dan Shirah" <mrsquash2@xxxxxxxxx>
- Subject: ***BOGO*** Re: [PHP] unset($_GET['i'])
>
> Hi
>
> given page1 has a list of goods and sends $i as a variable into a link to
> page2, ie, <a href="page2.php?i=3">send</a>
>
> Page2 adds the items recieved in an array.
>
> In page2 how can I unset the $_GET['i'] so that if I press F5(refresh) it
> doesn't add the same item to the array ?
>
> I tried unset($_GET['i']) but no success.
>
> Thanks
How about just adding a simple counter on your page.
if ($count == "0") {
Run through your script
At the end update the variable: $count == "1";
} else {
Don't run throught script because the value has already been added
}