redirect - PHP - & in header() -


i have parameter:

http://example.com?ex=http://la.net?c1=a1&c2=a2&c3=a3 

i want redirect url, while it, i'm getting into

http://example.com?ex=http://la.net?c1=a1 

i know it's because of & sign...

you should encode parameters passed url:

$url = "http://example.com?ex=".urlencode("http://la.net?c1=a1&c2=a2&c3=a3"); header('location: '.$url); 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -