I'm trying to create what I'm calling a password gateway for my website. It's the part where a user must register before continuing. A form pops up that says something like "Choose a username, choose a password, reenter password, enter email address" and possibly other fields.
I've captured the user input with a form via
<script type="text/javascript">
function username()
{
var a = getElementById('username')
var b = getElementById('password')
}
</script>
<form>
<input type="text" id="username">
<input type="text" id="password">
<input type="button" onClick="username()">
</form>
</script>
And I'm trying to figure out a way to verify the user when the user returns.
How is this usually done?
Right now I'm thinking add code to the function above and have it create a new folder on the server titled whatever username the user has chosen, and then put the password inside it.
Then when the user comes back, present a form that asks for the username and password.
Finally, have a function that checks the folder titles to see if the folder exists, and if it does then compare the password inside with the password the user has entered to see if they match.
What solution do most people use?
Help!