Hi, I am working with the following scripts, that enable a user to login to an existing directory named with thier name, the script checks that the directory exists. this much i have working.
If the directory does exist, then a session is started and the $jclogin var is registered as session variable $jcglobal
then using header, the file Contact.php is called in the same directory - this seems to be where the script stops. can anyone see a prob in my code..?
thanks, im just getting going at php so any help would be appreciated..
<?
$wronglogin = $_POST['gojclogin'];
$jclogin = $_POST['gojclogin'];
$jclogin = str_replace(" ","", $jclogin);
$jclogin = strtolower($jclogin);
if(is_dir("../contacts/$jclogin"))
{
session_start();
$_SESSION['jcglobal'] = "$jclogin";
header("Location: Contactsheet.php");
}
else
{
echo $wronglogin." is not a valid user.";
}
?>