[eluser]Kenan[/eluser]
[quote author="CroNiX" date="1404664228"]isset() will always be true in that case because this->input->post() will return boolean false if the variable does not exist, so it will ALWAYS be set (either FALSE, or a value). So you want to check with the === operator.
Code:
$q = $this->input->post('q');
if ($q !== FALSE) //variable existed
You don't want to use (!$q), because what if the post value was "0", which is a legitimate post value in a lot of forms.[/quote]
thanks for answer! but.. when i use cleaning such as
Code:
$q = htmlspecialchars(strip_tags(stripslashes(trim($this->input->post('q')))));
or such as
Code:
$q = $this->security->xss_clean($this->input->post('q'));
it doesn't work, i mean === doesn't work, and == works, that's why i confused
and my last question at the topic wasn't answered, pls