chackers chackers - 1 year ago 57
SQL Question

How can I create a folder in php named as user register and link in mysql ?

How can I create a folder in php named as per username at registration and link in mysql ? After that i want to upload files as per user upload and upload to user's folder.

Answer Source

Hi You can try something like this

    $name= trim($_POST['submit']);
    $email= trim($_POST['email']);
    $username= trim($_POST['username']);
    $password= trim($_POST['password']);
    if($name && $email && $username && password){
    // do what ever you want to do like insert into db etc
    $dirname = "path to you file/".$username;

<form  method='post'>
Your Full Name*:<input type='text' name='name'  maxlength="50" /></br>
Email Address*: <input type='text' name='email'' maxlength="50" /></br>
UserName*: <input type='text' name='username' maxlength="50" /></br>
Password*: <input type='password' name='password' maxlength="50" /></br>
<input type='submit' name='submit' value='Submit' />

for more info about mkdir please read