php - How to get refering URL when redirected from some page to another page -
i redirecting several pages dev.php using php header
<?php header(location: dev.php); ?>
i want know have been redirected here.
i have tried
<?php print "you entered using link on ".$_server["http_referer"]; ?>
but dosent work $_server["http_referer"];
works if access dev.php using <a href="dev.php">go developer page</a>
so how can referring url?
try below.
<?php header(location: dev.php?referrer=$_server[php_self]); ?>
or
header('referer: '.$_server['php_self']); header(location: dev.php);
if above methods don't work, have go sessions.
Comments
Post a Comment