07-10-2011, 07:55 PM
[eluser]sqwk[/eluser]
When the first name field has been set (The form has been submitted) but is empty ('') the if statement will not execute.
However, when one saves the post value into a variable first, it will.
Inconsistent?
Code:
if($this->input->post('first_name')) {
// Do something
};
When the first name field has been set (The form has been submitted) but is empty ('') the if statement will not execute.
However, when one saves the post value into a variable first, it will.
Code:
$first_name = $this->input->post('first_name');
if(isset($first_name)) {
// Do something
};
Inconsistent?