Createing directory
Posted: Thu Apr 01, 2004 3:50 pm
I need to have it so that when the admin logs in he can create a user.. the user is inserted into a database and same with his password
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:
That would be index.php ^^^
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..
I wanted to use sessions but the file i include to read the database and verify the password outputed the headers already.. and if i put start_session(); before i require db.php (the password checker) then db.php will just say invalid pass even if its correct
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>");
}