I have a PHP 'if' condition, which if true, than I'd like to redirect the user to somewhere else with javascript. However it doesn't seems to work, as it redirects me always, no matter if the condition is true or not.
<?php
if (isset($_SESSION['lol'])) {
?><script type="text/javascript">
<!--
window.location = "http://www.test.org"
//-->
</script><?php
}
?>
How is it possible? Or how could I make it to work?
header("Location: http://www.test.org");header("Location: http://www.test.org")