I want to redirect a php page using php if statement. I did the redirect code with javascript but its not working.
Can someone please help me modify my code if i missed something out or help me out with a better solution.
Below is the code;
$vbi = $row_rsRek['duck'];
if ($vbi == "blocked"){'<script>window.location.href = "http://www.url.com/login.php";
</script>
';}
else {echo "NOT WORKING";}
I tried this too
$vbi = $row_rsRek['duck'];
if ($vbi == "blocked"){header("Location: www.url.com/login.php");}
else {echo "NOT WORKING";}