title: dropdown option select in register form
body: <p>I'm creating a register form with a dropdown select option.
  The register form is:</p>
  
  <p>Name:
  Email:
  Password:
  School: (dropdown option list)
  I have set up two table, one called "users", the other "schools".
  In my "users" table, the columns are <code>"id"(int(11))</code>, <code>"email"(varchar(255)</code>, <code>"name"(varchar(64)</code>, and "school"(varchar (64)).
  In my "schools" table, the columns are "id"(int(11)), "users_id"(int(11)), and "school_id"(int(11))". I'm not sure if this table's setup is correct, so please tell me if there is a better way of setting it up. I made the "school_id" as I also later will have a search system where users can search for people in specific schools.</p>
  
  <p>So far the form part of my register.html:</p>
  
  <pre><code> &lt;form action="register.php" method="post"&gt;
      &lt;div class="field"&gt;
         &lt;label for="email"&gt;Email:&lt;/label&gt;
         &lt;input type="email" id="email" value="" autocomplete="on" action="" /&gt;
      &lt;/div&gt;
  
      &lt;div class="field"&gt;
         &lt;label for="password"&gt;Password:&lt;/label&gt;&lt;br /&gt;
         &lt;input type="password" id="password" autocomplete="off" /&gt;
      &lt;/div&gt;
  
      &lt;div class="field"&gt;
         &lt;label for="name"&gt;Name:&lt;/label&gt;&lt;br /&gt;
         &lt;input type="text" id="name" action="" /&gt;
      &lt;/div&gt;
  
      &lt;div class="field"&gt;
         &lt;label for="school"&gt;School:&lt;/label&gt;
         &lt;select id="school" size="1"&gt;
            &lt;option value="a"&gt;Apple School&lt;/option&gt;
            &lt;option value="b"&gt;Banana School&lt;/option&gt;
            &lt;option value="c"&gt;Carrot School&lt;/option&gt;
         &lt;/select&gt;
      &lt;/div&gt;    
  
      &lt;input name="Register" type="submit" id="register" value="" /&gt;
   &lt;/form&gt;
  </code></pre>
  
  <p>And my register.php:</p>
  
  <pre><code>&lt;?php
  require_once 'core/init.php';
  
  if(Input::exists()) {
     if(Token::check(Input::get('token'))) {
  
      $validate = new Validate();
      $validation = $validate-&gt;check($_POST, array(
          'email' =&gt; array(
              'required' =&gt; true,
              'min' =&gt; 2,
              'max' =&gt; 255,
              'unique' =&gt; 'users'
          ),
          'password' =&gt; array(
              'required' =&gt; true,
              'min' =&gt; 6
          ),
          'name' =&gt; array(
              'required' =&gt; true,
              'min' =&gt; 2,
              'max' =&gt; 50
          ),
  //I don't know how to put the school drop down in here)
      ));
  
      if($validation-&gt;passed()) {
          $user = new User();
  
          $salt = Hash::salt(32);
  
          try {
              $user-&gt;create(array(
                  'email' =&gt; Input::get('email'),
                  'password' =&gt; Hash::make(Input::get('password'), $salt),
                  'salt' =&gt; $salt,
                  'name' =&gt; Input::get('name'),
                  'school' =&gt; Input::get('school'),
                  'joined' =&gt; date('Y-m-d H:i:s'),
              ));
  
              Session::flash('home', 'You have been registered and can now log in!');
              Redirect::to('index.php'); 
  
          } catch(Exception $e) {
              die($e-&gt;getMessage());
          }
  
      } else {
          foreach($validation-&gt;errors() as $error) {
              echo $error, '&lt;br&gt;';
          }
      }
  }
  }?&gt;
  </code></pre>
  
  <p>If there are other ways to do this, please help me. I found this way through the OOP Login/register tutorial from phpacademy.</p>