Jump to content

Archived

This topic is now archived and is closed to further replies.

Immortal55

PHP Accounts

Recommended Posts

Alright I have a registration script and everything set up for my website. I am using sessions and all that jumbo. But one problem I am having, is when a user registers, I want a folder to be created based on the persons username that is entered in at registration under the value of '$uname'

How is possible to create a folder with thier username as the folders name, and when the folder is created there is automatically a folder added entitled 'images' and an index file for the persons profile in the folder. I want the profile to be accustomed to the username.

There will be a form in which the user can edit their information.

thanks in advance.

Share this post


Link to post
Share on other sites
We can't really offer much help when you describe your problem as if we have your code right in front of us to reference.

When you say "folder" I assume your speaking on the disk level or are you talking about a logic device?


We need to see your code
_______________
^
||
(Bottom Line)

Share this post


Link to post
Share on other sites
Sorry, I was at work and was anxious, sorry again.

Here is my register script:

[code]
<?
    if( (!$name) or (!$uname) or (!$pass) or (!$age) or (!$art) or (!$intrest) )
        {
        echo( "<center><b>New User Registration for Studio</b>
                <br>
                <form action='$PHP_SELF' method='post'>
                <table cellpadding='0' cellspacing='0' border='0'>
                <tr><td>Name:</td><td><input type='text' name='name' value='$name'></td></tr>
                <tr><td>Username:</td><td><input type='text' name='uname' value='$uname'></td></tr>
                <tr><td>Password:</td><td><input type='password' name='pass' value='$pass'></td></tr>
                <tr><td>Age:</td><td><input type='text' name='age' value='$age'></td></tr>
                <tr><td>Art Forms:</td><td><input type='text' name='art' value='$art'></td></tr>
                <tr><td>Intrests:</td><td><input type='text' name='intrest' value='$intrest'></td></tr>
                </table>
                <br>
                <input type='submit' value='Register!'></center>
                </form>
            "); }
            
    else
        { $conn = @mysql_connect ("localhost", "mitchand_mitch", "spiffy")
            or die ("Registration failure, try again.");
          $db = @mysql_select_db ("mitchand_studio", $conn)
              or die ("Registration failure, try again.");
          $sql = "insert into users
                  (name, uname, pass, age, art, intrest) values
                (\"$name\", \"$uname\", \"$pass\", \"$age\", \"$art\", \"$intrest\")";
          $result = @mysql_query ($sql, $conn)
              or die ("Registration failure, try again.");
          if($result)
                  { echo("Thanks, $name, you are now a member of Studio"); }
                
                }
                
                ?>
[/code]

Now, after a user fills out the registration, I want a folder to be created on the server entitled by thier user name. How would I do that?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.