So i made a simple login page, but im having a problem with the index.php page. It gives me a redirect error. Im a newbie in php coding. Hopefully someone can help me with this.
<?php
session_start();
if(!isset($_SESSION['user_name'])){
header('Location: index.php');
exit;
}
?>
<html>
<body>
Login Successful
</body>
</html>
Thanks anyway!