Jump to content


PHP Accounts

  • Please log in to reply
2 replies to this topic

#1 Immortal55

  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts

Posted 14 March 2006 - 01:31 AM

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.

#2 phporcaffeine

  • Members
  • PipPipPip
  • Advanced Member
  • 361 posts
  • LocationOhio, USA

Posted 14 March 2006 - 02:14 AM

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)

Ryan Huff
President & Founder, MyCodeTree
support@mycodetree.com | http://mycodetree.com

#3 Immortal55

  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts

Posted 14 March 2006 - 02:32 AM

Sorry, I was at work and was anxious, sorry again.

Here is my register script:

    if( (!$name) or (!$uname) or (!$pass) or (!$age) or (!$art) or (!$intrest) )
        echo( "<center><b>New User Registration for Studio</b>
                <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>
                <input type='submit' value='Register!'></center>
            "); }
        { $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.");
                  { echo("Thanks, $name, you are now a member of Studio"); }

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?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users