dealing with # in urls

From: Date: Thu, 07 Mar 2002 22:57:22 +0000
Subject: dealing with # in urls
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-87701@lists.php.net to get a copy of this message
Hi, I'm having a problem dealing with #'s in my urls. Most browsers will not send the # with the request because they know it's only for use with a named anchor. so when you type in: http://mysite.com/test.php?id=0#top all that the browser will send as a request is http://mysite.com/test.php?id=0 this is good. My problem is when a weird browser sends the #top as part of the request. when this happens, the value of id is now "0#top". I need to make sure this doesn't happen. I know I could do some ereg_replace on all my variables, but I would have to do this on every request and I'd rather avoid it. in php.ini there is a variable called arg_separator.input that looks like it can help but when I add the line: arg_separator.input = "&#" I still get $id = "0#top" so it doesn't seem to be working. I have php 4.0.6 thanks for any ideas, - Mark

« previous php.general (#87701) next »