Re: Removing cart items with hyperlink question
| From: | David Smith | Date: | Sun, 08 Jun 2003 23:54:56 +0000 |
| Subject: | Re: Removing cart items with hyperlink question | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-28436@lists.php.net to get a copy of this message | ||
Boa Constructor wrote:
The first line below works but the second one doesn't. If $quantity were to equal 0 then I want both of these to do exactly the same thing. echo "<Input type=text size=2 name=quantity[$buy] value=$quantity>"; echo "<a href=$PHP_SELF?quantity[$buy]=0>Remove Item</a><br>";Are you using POST or GET on the receiving end of the script? Also, try urlencoding the href like this: echo "<a href=\"" . urlencode( "$PHP_SELF?quantity[$buy]=0" ) . "\">Remove Item</a><br>"; And add this line prior to the echo: $PHP_SELF = $_SERVER['PHP_SELF']; In case regiester_globals is off (I hope it is). --Dave