Form and Submission and Saving

+1 Robert Summers · November 4, 2014
So I have almost finished my website, I just need to be able to save this form data so that anyone in the world once my site is running can login and logout without hesitation. 

Here is my form code in HTML

<form id="" method="" type="">
First Name: <input type="email" name="email" value=""/><br/><br/>
Second Name: <input type="email" name="email" value=""/><br/><br/>
Username: <input type="username" name="username" value="" maxlength="15"/><br/><br/>
E-mail Adress: <input type="email" name="email" value=""/><br/><br/>
Telephone Number: <input type="email" name="email" value=""/><br/><br/>
Password: <input type="password" name="password" value="" maxlength="10"/><br/><br/>
<input type="submit" name="submit" value="Submit"/>

Is there anyway I can do this in JavaScript, if not how do I go about this and make a logout happen.

Many thanks for the help in return,

Kind regards 

Post a Reply


Oldest  Newest  Rating
0 Ron Butcher · November 6, 2014
You need to handle this on the server side using PHP or another server side language.  If you have something that is storing usernames and passwords you need a database to store this information in, not just place it in a file.  The database is more secure and gives you a lot more flexibility.

Keep this in mind:  most people use the same password for the majority of their online activity, including banking and other items that they should keep secure.  You need to remember this when storing their user information.  Focus on security - storing passwords in a text file is not secure!

On your form:  you will need to set the method to POST.  If you leave it blank, the information will be displayed in the browser URL when they hit the submit button.  It will look like this:  Again, this is not secure.

Did you mean to set most of the inputs to type=email and name=email?
  • 1

HTML / CSS / Web Design


Discuss, share, ask, learn and teach HTML5 and CSS3.