I have on my 4.3.2 localhost
Yes dalecosp it is a virt-host setup. They run 4.3.1.
and heeeeere's the code
loginScript.php
<?php
$local_Username = $_POST['username'];
$local_Password = $_POST['password'];
$failedPage = "failed.php";
//$urlPrefix = "http://www.google.com.au/";
session_start(); # must do this on each page a $_SESSION var is needed/used
$user[] = array("user1", "pass1", "temp/index.php");
$user[] = array("user2", "pass2", "temp/index.php");
$user[] = array("user3", "pass3", "temp/index.php");
$members = count($user);
for($i=0;$i<$members; $i++){
if(($local_Username==$user[$i][0])&&($local_Password==$user[$i][1])){
$_SESSION['loggedin'] = 1; # assign a logged in status to this var
$_SESSION['member'] = $i; # assign the user's number to this var
$successPage = $user[$i][2];
header("Location: $successPage"); # send this user to his successPage
}
}
if ($_SESSION['loggedin']!==1) {
header("Location: $failedPage"); # send the user to the failedPage
}
?>
And here is where the problem is (as far as I can anrrow down, remember I am a newb :p) This is from the index.php file in the relevant folder.
<?PHP
session_start();
if ($_SESSION['member']!==1){ # if the member number is not equal to the relevant user number then
header("Location: ../login.php"); # send 'em back to login page
}else{ # otherwise process HTML
?>
Hope this helps you help me 🙂
Cheers
what's the session cookie path, and do you have permissions on that dir? Does it even exist?
That's what I thought to. I have contacted the host, but as usual the techs aren't working today. 🙂
BTW can you explain that web log, loggin messages, parser thing in simpler terms? Is there a way around it?