Re: [PHP] unset($_GET['i'])

2008-09-04 Thread Bill
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

Re: [PHP] unset($_GET['i'])

2008-09-04 Thread Dan Shirah
> > 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

Re: [PHP] unset($_GET['i'])

2008-09-04 Thread Micah Gersten
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

RE: [PHP] unset($_GET['i'])

2008-09-04 Thread Boyd, Todd M.
> -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

Re: [PHP] unset($_GET['i'])

2008-09-04 Thread Wolf
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

Re: [PHP] unset($_GET['i'])

2008-09-04 Thread Bill
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

Re: [PHP] unset($_GET['i'])

2008-09-04 Thread Dan Shirah
> > 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']

[PHP] unset($_GET['i'])

2008-09-04 Thread Bill
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