urldecode - Encoding and decoding in PHP doesn't work -


in html file encoding url this:

encodeuricomponent(url); 

in php file use grab url , sanitize:

$url = filter_var(filter_var(($_get['url']), filter_sanitize_url),filter_sanitize_string); 

i'm experiencing trouble when adding other parameters url. when take out javascript encodeuricomponent whole thing starts working use encodeuricomponent, tried decode url on php side:

$url = filter_var(filter_var((urldecode($_get['url'])), filter_sanitize_url),filter_sanitize_string); 

doesn't work, tried other things no luck. don't see how above wouldn't work. else can try, doing wrong?


Comments