i have this form which makes possible the redirection of the user after he has logged in, what i intend to do is that, after the user arrives at a certain page, i have the condition, if !session->redirect to login.php else, redirect to another page!
What may be wrong with my code here?
<?php include_once("db/envato_db.php"); session_start(); if(!$_SESSION['gal_id']){
header("location:login.php"); // Redirect to login.php page } else { header('location:galleries.php'); // Redirect to login.php page }
?>