i am trying to create a site, when user create his account then make automatic his directory with his name.
when he wants to upload his photos, these photos go automatic in his folder or directory.
im my register page i have added these lines:
$addtothedb="INSERT INTO login (firstname,lastname,useremail,password,Gender,Dateofbirth) VALUES ('". $fristname . "','". $laname ."','" . $email . "','". $pass ."','". $sgender . "','". $date . "')" ;
$result=mysqli_query($con,$addtothedb);
$cur = "USERS/";
$gofile=$cur.$email;
if($result){
if ( mkdir($gofile,0777) ) {
} else {
}
echo " <div id='success'> Account Successfully Created. <br> Now you can Login. </div>";
}
else {
echo "<div id= 'success_no' ><center>Failure</center></div>";
}
and this is how i m trying to do it.
<?php
$con = mysqli_connect("localhost","root","","test");
echo $_SESSION['name']."<br />" ;
$cur = "USERS/";
$gofile=$cur .$_SESSION["name"];
echo "<br/>";
echo $gofile;
echo "<br/>";
$des= dirname($gofile.'/'.$_SESSION['name']);echo "<br/>";
echo $des;
?>