A user will sign up with an html form giving you his user name and password.
He submits the form info to php script that will clean the input and make a new entree for him in your database (containing his name and password and a automatically generated number labeled user_id to id him to you.)
You will get this number as a variable and generate the profile html. Place the id number in a hidden field!
When the profile is submitted you can add the info to the database table where the user_id equals the hidden field number received.
You now have his profile.