Why $_GET['i'] doesn't unsets ?
Your page URL has ?i=asdf in it. As such, $_GET['i'] is being set every time you refresh
that particular URL. Unsetting $_GET['i'] will only erase the variable for that instance
of that PHP script. As soon as you refresh, you are calling a new instance of that
>
> Dan Shirah a écrit :
>
>> How about just adding a simple counter on your page.
>>
>>
> That's what I do but that "counter" resets when you press F5 and is not
> functionnal.
>
> Why $_GET['i'] doesn't unsets ?
Are you saving the array to a database once it is created? If not, wouldn't
the a
The $_GET array comes from the URL which is resent every time someone
hits F5. unset works on the server, not on the browser. You could
capture it, add it to the session and then redirect without it in the URL.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
> -Original Message-
> From: Bill [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 04, 2008 3:23 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] unset($_GET['i'])
>
> Dan Shirah a écrit :
> > How about just adding a simple counter on you
Bill <[EMAIL PROTECTED]> wrote:
> Dan Shirah a écrit :
> > How about just adding a simple counter on your page.
> >
>
> That's what I do but that "counter" resets when you press F5 and is not
> functionnal.
>
> Why $_GET['i'] doesn't unsets ?
Because you get a new i from the URL, hence
Dan Shirah a écrit :
How about just adding a simple counter on your page.
That's what I do but that "counter" resets when you press F5 and is not
functionnal.
Why $_GET['i'] doesn't unsets ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.p
>
> Hi
>
> given page1 has a list of goods and sends $i as a variable into a link to
> page2, ie, send
>
> 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']
Hi
given page1 has a list of goods and sends $i as a variable into a link
to page2, ie, send
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 succes
8 matches
Mail list logo