Re: rawurldecode

From: Date: Tue, 29 Mar 2005 14:37:04 +0000
Subject: Re: rawurldecode
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-211781@lists.php.net to get a copy of this message
I got it. After you said I shouldn't need it I started playing around and found that you were right...I didnt need it for spaces and other punctuation. But I was then having a problem with amperstands. It was dropping everything after an amperstand off. I ended up doing a rawurldecode of $_SERVER["QUERY_STRING"] and then a strrchr() on it to return everything past the "=" sign. Then I had to do a substr() to get rid of the "=". Its probably a long way of doing this and I know it probably wont work if I add a second variable to the url, but I have already taken precautions against that. This should work unless anyone see's amore major security issue with it. $end = strlen(strrchr(rawurldecode($_SERVER["QUERY_STRING"]),"=")); echo substr(strrchr(rawurldecode($_SERVER["QUERY_STRING"]),"="), 1, $end); Thanks

« previous php.general (#211781) next »