I'm working with the Zend Framework on a project that requires the user to activate their account by checking their email and clicking on the activation link. The activation link works fine and the user can login once their account is set active. My question is how can i display a message when the user clicks on the activation link and get redirected to the home page, acknowledging that their account has been activated.
I was trying to write an if statement to check if HTTP_REFERER = the URL of the activation link. But that didn't work. Any help would be greatly appreciated.
Here's the if statement:
<script language="javascript" type="text/javascript">
$(document).ready(function() {
<?php if ($_SERVER['HTTP_REFERER'] == 'activationLinkGoesHere'){ ?>
$("#suc_message").html('<?php echo 'Your account has been activated!';?>');
$("#suc_message").fadeIn(2000);
$("#suc_message").fadeOut(20000);
<?php } ?>
});
</script>
Thanks :)