I have a index page which checks to see if a session variable has been set and if so it redirects (using 'header') to the 'customer' page. This works on my local host but does not work when I upload the site to GoDaddy:
<?php
include("Classes.php");
session_start();
include("connector.php");
if ($_SERVER['REQUEST_METHOD'] == "GET"){
session_unset();
}
if ($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST['accname'])){
$name = $_POST['accname'];
$password = $_POST['password'];
$_SESSION['customer'] = new customer($name,$password);
echo $_SESSION['customer']->custno;
if (isset($_SESSION['customer']->custno)) {
header("Refresh:0;customer.php");
}
}