title: Code Igniter form not posting
body: <p>I have made a site in CodeIgniter2, but I can't get the forms to work, as I can't seem to even work out how to get it to post! Any help? Here is my code and the forms are only on the recommend, contact-us and support pages:</p>
  
  <p>Form: </p>
  
  <pre><code>&lt;div id="mainWhiteBox"&gt;
          &lt;h3&gt;Tell people about us...&lt;/h3&gt;
          &lt;p&gt;If you know of a company or individual who need a really great design agency to help them with a project, let them know about us and benefit too. &lt;br /&gt;&lt;br /&gt;
          &lt;span class="customColour"&gt;We will give you &amp;pound;50 of Marks &amp;amp; Spencer vouchers for every client you recommend to us who goes on to become a client of xxxxx, it's that simple &amp;amp; there is no limit to the amount of vouchers you can earn!&lt;/span&gt;&lt;/p&gt;
          &lt;div id="recommendSomeone"&gt;
              &lt;?php echo validation_errors(); print_r($_POST);?&gt;
              &lt;?php echo form_open('recommend', array('id' =&gt; 'recommendForm')); ?&gt;
                  &lt;label for="friendName"&gt;Your Friend's Name&lt;/label&gt;
                  &lt;input type="text" id="friendName" value="&lt;?php echo set_value('friendName'); ?&gt;" /&gt;
                  &lt;label for="friendEmail"&gt;Your Friend's Email Address&lt;/label&gt;
                  &lt;input type="email" id="friendEmail" value="&lt;?php echo set_value('friendEmail'); ?&gt;" placeholder="someone@youknow.com" /&gt;
                  &lt;label for="customerName"&gt;Your Name&lt;/label&gt;
                  &lt;input type="text" id="customerName" value="&lt;?php echo set_value('customerName'); ?&gt;" /&gt;
                  &lt;label for="customerEmail"&gt;Your Email Address&lt;/label&gt;
                  &lt;input type="email" id="customerEmail" value="&lt;?php echo set_value('customerEmail'); ?&gt;" placeholder="you@youremailaddress.com" /&gt;
                  &lt;label for="friendConfirm"&gt;&lt;input type="checkbox" id="friendConfirm" value="1" &lt;?php echo set_checkbox('friendConfirm', '1'); ?&gt; /&gt;I confirm that I know the person I am recommending above.&lt;/label&gt;
                  &lt;input type="submit" value="Submit Recommendation" /&gt;
              &lt;/form&gt;
              &lt;img src="&lt;?=base_url(); ?&gt;images/uploads/&lt;?php echo $images[0]["image_filename"]; ?&gt;" alt="&lt;?php echo $images[0]["image_alt"]; ?&gt;" width="180px" height="300px" class="floatRight" /&gt;
          &lt;/div&gt;
          &lt;p class="elevenFont"&gt;* Get &amp;pound;50 of Marks &amp;amp; Spencer vouchers per company or person recommended who goes on to open an account with xxxxx.&lt;/p&gt;
      &lt;/div&gt;
      &lt;?php include("/home/xxxxx/libraries/application/views/widgets/newsWidget.php"); ?&gt;
      &lt;?php include("/home/xxxxx/libraries/application/views/widgets/twitterWidget.php"); ?&gt;
      &lt;?php include("/home/xxxxx/libraries/application/views/widgets/quickViewWidget.php"); ?&gt;
      &lt;?php include("/home/xxxxx/libraries/application/views/widgets/fbLikePageWidget.php"); ?&gt;
      &lt;?php include("/home/xxxxx/libraries/application/views/widgets/getQuoteBarWidget.php"); ?&gt;
      &lt;?php include("/home/xxxxx/libraries/application/views/widgets/newsletterSubscribeWidget.php"); ?&gt;
  </code></pre>
  
  <p>Controller: </p>
  
  <pre><code>&lt;?php
  
  class Pages extends CI_Controller {
  
  public function __construct()
  {
      parent::__construct();
      $this-&gt;load-&gt;model('pages_model');
  }
  
  
  public function view($page = 'home')
  {
  
      if ( ! file_exists('/home/urbanfea/libraries/application/views/pages/'.$page.'.php'))
      {
          // Whoops, we don't have a page for that!
          show_404();
      }       
  
      $data['title'] = $this-&gt;pages_model-&gt;getTitle($page);
      $data['showcase'] = $this-&gt;pages_model-&gt;getShowcase();
      $data['news'] = $this-&gt;pages_model-&gt;getNewsWidgetContent();
      $data['quote'] = $this-&gt;pages_model-&gt;getQuoteFromBank();
      $data['images'] = $this-&gt;pages_model-&gt;getPageImageArray($page);
      $data['PageStraplines'] = $this-&gt;pages_model-&gt;getStraplines($page);
      $data['serverStatus'] = $this-&gt;pages_model-&gt;getIssue("1");
  
      if($page == "support")
      {
          $this-&gt;load-&gt;view('templates/supportHead', $data);
      }
      else
      {
          $this-&gt;load-&gt;view('templates/head', $data); 
      }
  
      if($page == "recommend" || $page == "contact-us" || $page == "support")
      {
          $this-&gt;load-&gt;helper(array('form', 'url'));
          $this-&gt;load-&gt;library('form_validation');
  
          $this-&gt;form_validation-&gt;set_rules('friendName', 'Friend\'s Name', 'required');
          $this-&gt;form_validation-&gt;set_rules('friendEmail', 'Friend\'s Email Address', 'required');
          $this-&gt;form_validation-&gt;set_rules('customerName', 'Customer\'s Name', 'required');
          $this-&gt;form_validation-&gt;set_rules('customerEmail', 'Customer\'s Email Address', 'required');
          //$this-&gt;form_validation-&gt;set_rules(FriendConfirm', 'Confirm you know the person', 'required');
  
          if ($this-&gt;form_validation-&gt;run() === true)
          {
              $this-&gt;load-&gt;view('templates/formSuccess', $data); echo "a";
          }
          elseif($this-&gt;form_validation-&gt;run() === false &amp;&amp; validation_errors() != "")
          {
              $this-&gt;load-&gt;view('templates/formError', $data); echo "b";
          }
          elseif($this-&gt;form_validation-&gt;run() === false)
          {
              echo "c";
          }
  
      }
  
      $this-&gt;load-&gt;view('templates/header', $data);
      $this-&gt;load-&gt;view('pages/'.$page, $data);
      $this-&gt;load-&gt;view('templates/footer', $data);
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>?></p>
  
  <p><strong>Edit</strong></p>
  
  <p>Here are the routes in my router:</p>
  
  <pre><code>$route['404_override'] = '';
  
  $route['user/(:any)'] = 'user/view/$1';
  $route['user'] = 'user/login';
  $route['our-work/(:any)'] = 'our_work/view/$1';
  $route['our-work'] = 'our_work';
  $route['what-we-do/(:any)'] = 'what_we_do/view/$1';
  $route['what-we-do'] = 'what_we_do';
  $route['(:any)'] = 'pages/view/$1';
  $route['default_controller'] = 'pages/view';
  </code></pre>