This PHP snippet comes handy when post login you have to redirect user to the same page which he was browsing earlier.
Syntax
1
2
3
|
<?php
echo "Currently you are on: ".current_url();
?>
|
1
2
3
4
5
6
|
function current_url()
{
$url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$validURL = str_replace("&", "&", $url);
return validURL;
}
|
1
2
3
|
<?php
echo "Currently you are on: ".current_url();
?>
|
Hello Friends! I am Ramana a part time blogger from Hyderabad.
0 comments:
Post a Comment