O'Reilly logo

CouchDB and PHP Web Development Beginner's Guide by Tim Juravich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — adding an e-mail field to the signup form

Let's add an input field so users can enter an e-mail address into the views/signup.php page.

  1. Open signup.php in your text editor (/Library/Webserver/Documents/verge/views/signup.php)
  2. Add the highlighted code to add a label and input field for the e-mail addresses:
    Signup
    <form action="<?php echo $this->make_route('signup') ?>" method="post">
    <label for="name">Name</label>
    <input id="name" name="name" type="text"> <br />
    <label for="email">Email</label>
    <input id="email" name="email" type="text"> <br />
    
    <input type="Submit" value="Submit">
    </form>
    

What just happened?

We added an additional field to our signup form that will accept the input for an e-mail address. By adding the email field ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required