I'm trying to get a simple login page, user inputs their details and goes to the main.php page.
Here's the code http://pastebin.com/M4LZdcBt
Steps
-Go to localhost/game -Enter username/password from database -I would like to go to the main page I have set up -Instead I get the error message "You need to be logged in to view this page!" which is set to show if the user doesn't have a session, but the code says it should give them a session?
Here is validation code, it is on my main.php page
<?php
session_start();
include("header.php");
if(!isset($_SESSION['uid'])){
echo "You must be logged in to view this page!";
}else{
?>