I Want to pass Url inside one variable, this variable contains url with values.
for example:
$addr = "http://".$_SERVER['SERVER_NAME']."/".$_SERVER['REQUEST_URI']."";
echo $addr;
this step will give me http://localhost/index.php?page=3&var1=A&var2=B
When i passing this $addr var to another page, and echo it, i get only `http://localhost/index.php?page=3
its look like when there is & sign its gone.
what should i do? there is way to pass this variable and echo the whole var?
thanks.
You will want to
urlencodethem. A quick Google search shows me that simply replacing&with%26is enough.