Re: rawurldecode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux