title: CodeIgniter Input , and Validation
body: <p>I am using codeIgniter 2.2.2.
  In a Controller I captured the input so that I pass it back to the view in case the validation is failed, so that user is not forced to fill all the fields from the start, I set the following variable through $data array</p>
  
  <pre><code>$data['fullname'] = $this-&gt;input-&gt;post('fullName');
  </code></pre>
  
  <p>But when the user access the form at first it gives as error as follows.</p>
  
  <pre><code>A PHP Error was encountered
  
  Severity: Notice
  
  Message: Undefined variable: fullname
  </code></pre>
  
  <p>If I use <code>$this-&gt;input-&gt;post('fullName');</code> directly inside the view than no error is triggered, but I want to pass it from the Controller.</p>
  
  <p>The second issue is when I set form validation rule for this input as <code>$this-&gt;form_validation-&gt;set_rules('fullName', 'Full Name', 'required|alpha');</code> the validation rule <code>alpha</code> doesn't even allow spaces which in this case I require, because the form field is full name, where there must be a space e.g., "Albert Einstein".</p>
  
  <p>I can solve this problem by setting two different form input fields as "First Name" and "Last Name", but I don't like that, because I think a framework should make my life easier not harder.</p>
  
  <p>Here is an example gist showing the example code, which will trigger the errors I said. <a href="https://gist.github.com/DevotionGeo/84d4cb4322d4fc0aa7ce" rel="nofollow">Example Gist</a></p>