1

This is what I am using to check if an post value is empty or not in codeigniter.

if($this->input->post('inputEmail')) {  }

Just wanted to know what is the best method to check it, the above mentioned method or

$temp = $this->input->post('inputEmail');
if(!empty($temp)) { }

1 Answers1

-1

Check with isset in php to check whether variable is set or not.

Try this:

if(isset($tmp))
{
    //it is set
}

else
{
    //not set
}
Shoukat Mirza
  • 800
  • 9
  • 19
Vinoth
  • 23
  • 5