urlencode - How to encode a url in a website -


this code,

if ($r == 'donald') {         echo '<script>window.location.href="test.php"</script>';     } 

how do in way when website display url encoded? know got urlencode function. in case how use , nice if show me :d thank you!

assuming url stored in $url:

$url="http://www.google.com"; if ($r == 'donald') {   echo "<script>window.location.href=\"".urlencode($url)."\" </script>"; } 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -