There's still a bunch of things missing from that form.. What in the hell is the "Delete Password" field about? How/Why would you delete a password when registering? Did you mean "Repeat" Password? And another thing: Those password fields are text type. Nobody in their right mind would fill out that form!
Look, I'm going to walk you (and anyone else who cares) on how to make a form. Not just a technically functional form, but one that won't burn anyone's eyes when they look at it.
First, decide a name for your form. Let's say "myForm"
Second, you start with a
Fieldset.
What is that? Well you'll find out, just do it.
You can make a fieldset like this:
Code:
<fieldset name="myForm_fieldset" id="myForm_fieldset">
</fieldset>
Also, a fieldset can have what we call a legend. That's for the title of your form in detail. Normally we do that bold or something to be fancy. (not too fancy)
Code:
<fieldset name="myForm_fieldset" id="myForm_fieldset">
<legend><strong>My Form</strong></legend>
</fieldset>
Easy.
Now we add the form tags:
Code:
<fieldset name="myForm_fieldset" id="myForm_fieldset">
<legend><strong>My Form</strong></legend>
<form name="myForm" id="myForm" action="" method="post">
</form>
</fieldset>
Okay next I'll tell you about labels. Labels are awesome because they make it easy to give each field a tab-index, a key response, and in most browsers the user can click the text, and the input box will become focused.
For this example, we're just going to use tabindex. Another important note with labels is the
for attribute. Everytime you use a label, set for="input_name". In this case, for="username".
Let's make a username field.
Code:
<fieldset name="myForm_fieldset" id="myForm_fieldset">
<legend><strong>My Form</strong></legend>
<form name="myForm" id="myForm" action="" method="post">
<label for="username" tabindex="1">
Username
<input type="text" name="username" id="username" value="" />
</label>
</form>
</fieldset>
So that's easy enough. Now let's make the rest of the form. Don't forget to sepperate form fields with line breaks [<br />]
Code:
<fieldset name="myForm_fieldset" id="myForm_fieldset">
<legend><strong>My Form</strong></legend>
<form name="myForm" id="myForm" action="" method="post">
<label for="username" tabindex="1">
Username
<input type="text" name="username" id="username" value="" />
</label>
<br />
<label for="password" tabindex="2">
Password
<input type="password" name="password" id="password" value="" />
</label>
<br />
<label for="repeat_pass" tabindex="3">
Repeat Password
<input type="password" name="repeat_pass" id="repeat_pass" value="" />
</label>
<br />
<label for="email" tabindex="4">
Email
<input type="text" name="email" id="email" value="" />
</label>
<br />
<input type="submit" name="submit" id="submit" value="Submit" />
</form>
</fieldset>
Example of the form
here.
Now for the register script, Click here:
http://forum.ragezone.com/f86/php-sql-user-database-in-under-5-min-tut-449083/