I want to check if a user comes from a specific page to the current page.
e.g
if (user comes from /bingo.php)
{ wp_redirect( /newpage.php );exit; }
else { // do nothing };
thank you 🙂
I want to check if a user comes from a specific page to the current page.
e.g
if (user comes from /bingo.php)
{ wp_redirect( /newpage.php );exit; }
else { // do nothing };
thank you 🙂
You must be logged in to post a comment.
Without completely answering your question, I’d say you could look into
$_SERVER['HTTP_REFERER']
. This contains the previous page your user came from. Please note that this is not always set.Here is my code for my case: