Bug #11564 Updated: Passing variables using the GET method
| From: | cnewbill@php.net | Date: | Tue, 19 Jun 2001 22:39:44 +0000 |
| Subject: | Bug #11564 Updated: Passing variables using the GET method | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-57308@lists.php.net to get a copy of this message | ||
ID: 11564
Updated by: cnewbill
Reported By: chaz@ro0t.com
Old-Status: Open
Status: Bogus
Bug Type: Scripting Engine problem
Operating system:
PHP Version: 4.0.5
Assigned To:
Comments:
This is a browser issue, since it uses # as the key that it needs to go that particular anchor of a
page.
Use urlencode when passing variables in the URL like that.
<?
if($name) {
echo $name;
}else{
echo "<a
href=\"$PHP_SELF?name=".urlencode("#asdf")."\">Click
me</a>";
}
?>
-Chris
Previous Comments:
---------------------------------------------------------------------------
[2001-06-19 12:18:54] chaz@ro0t.com
<?
if($name) {
echo $name;
}else{
echo "<a href="$PHP_SELF?name=#asdf">Click me</a>";
}
?>
When you click on 'Click Me', it displays the link again, when it should output
'#asdf'. This does not happen using the POST method.
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11564&edit=2