Menu icon Foundation
Help with Registration Form

I'm fairly new to coding with HTML, creating CSS, so these are probably easy questions. I'm trying to create a registration form and I'm having trouble with a couple things.

First, I want to be able to link my Registration button to a php so that the information is confirmed on the next page.

Second, I want to add password validation, but the HTML validation that I'm finding online doesn't help show me where to put it in my code.

Here is the registration page... http://kimberleea.siteground.net/Registration.html.

<form action="confirmreg.php" method="post">
    <div class="large-6 columns">
      <label>first name*
    	<input type="text" name="firstname" placeholder="first name" required />
      </label>
    </div>
        <div class="large-6 columns">
      <label>last name*
        <input type="text" name="lastname" placeholder="last name" required />
      </label>
    </div>
        <div class="large-6 columns">
      <label>email address*
        <input type="email" name="email" placeholder="email"required />
      </label>
    </div>
        <div class="large-6 columns">
      <label>confirm email*
        <input type="email" name="emailconfirm" placeholder="email" required />
      </label>
    </div>
    <div class="large-6 columns">
        <label>password*</label>
        <input type="password" name="password" placeholder="password" required />       
        <medium class="input">Password must be at least 8 characters; Contain at least three character types: lowercase letters, uppercase letters, numbers, punctuation; Do not include your username.</medium>
         </div>
    <div class="large-6 columns">
        <label>confirm password*</label>
          <input type="password" name="passwordconfirm" placeholder="password" />
        
        </div>
        <div class="large-12 columns">
       <div align="right"><a href="confirmreg.php" class="button-lrg">REGISTER</a> 
       </div>
</form>
            

         

PHPhtmlRegistration Form

I'm fairly new to coding with HTML, creating CSS, so these are probably easy questions. I'm trying to create a registration form and I'm having trouble with a couple things.

First, I want to be able to link my Registration button to a php so that the information is confirmed on the next page.

Second, I want to add password validation, but the HTML validation that I'm finding online doesn't help show me where to put it in my code.

Here is the registration page... http://kimberleea.siteground.net/Registration.html.

<form action="confirmreg.php" method="post">
    <div class="large-6 columns">
      <label>first name*
    	<input type="text" name="firstname" placeholder="first name" required />
      </label>
    </div>
        <div class="large-6 columns">
      <label>last name*
        <input type="text" name="lastname" placeholder="last name" required />
      </label>
    </div>
        <div class="large-6 columns">
      <label>email address*
        <input type="email" name="email" placeholder="email"required />
      </label>
    </div>
        <div class="large-6 columns">
      <label>confirm email*
        <input type="email" name="emailconfirm" placeholder="email" required />
      </label>
    </div>
    <div class="large-6 columns">
        <label>password*</label>
        <input type="password" name="password" placeholder="password" required />       
        <medium class="input">Password must be at least 8 characters; Contain at least three character types: lowercase letters, uppercase letters, numbers, punctuation; Do not include your username.</medium>
         </div>
    <div class="large-6 columns">
        <label>confirm password*</label>
          <input type="password" name="passwordconfirm" placeholder="password" />
        
        </div>
        <div class="large-12 columns">
       <div align="right"><a href="confirmreg.php" class="button-lrg">REGISTER</a> 
       </div>
</form>
            

         
Karl Ward over 5 years ago

You already have confirmreg.php, and if you have a submit button to your form, it will send the form data to that script. What exactly do you mean password validation? That has to be handled by your backend/PHP also, else its not really a secure password is it ...

<button type="submit">Submit</button>

Kim Adam over 5 years ago

But I want the button to say "Register" not Submit. And I have no idea about backend/PHP, like I said, I'm new to this.

So is this what my code is suppose to be???

REGISTER

Karl Ward over 5 years ago

You need some imagination as a web designer ... To change "Register" to "Submit":

<button type="submit">Submit</button>

...
HTML
<button type="submit">Register</button>

Backend PHP to create a mail script, unfortunately has nothing to do with Foundation, which is a frontend platform. You would need to search Google "PHP simple form script" and start learning ...

Kim Adam over 5 years ago

OK, thank you. I'll stick with the Submit then. :-)