Jump to content

PHP Accounts


Immortal55

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.
Link to comment
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)
Link to comment
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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.