Then I need to create user/clients/$user/index.php user/clients exists but I need to create directory user/clients/$user then put index.php
index.php uses the users password and username in it so for instance if username is bob:
Code: Select all
<?php
session_start();
$pass= $_REQUESTї'pass'];
$user = $_REQUESTї'user'];
echo("<body bgcolor=#DAF9FE>");
if($user=="bob" and $pass=="bobspassword"){
echo("Welcome bob!<BR><BR>");
echo("<BR><BR><a href='../../logout.php'>Logout</a>");
} else {
echo("No Acess, please login first");
}
?>I need every instance of bob to be relevant to the username etc...
So how would I go about createing a directory then a file? I already coded the database parts of it and the login checks if in the database bob's pass is "bobspassword" then presents the following code..
Code: Select all
if ($dbpass==$pass) {
echo("<a href='clients/$user/index.php?user=$user&pass=$pass'>Welcome $user, click here to goto your welcome page</a>");
}