So I am having a similar issue to this post: PHP strpos not working, but not quite.
Here is my situation (from a CodeIgniter application):
$_submit = strtolower($this->input->post('form-submit'));
if(strpos('save', $_submit) !== FALSE){
// we have to save our post data to the db
}
if(strpos('next'), $_submit) !== FALSE){
// we have to get the next record from the db
}
The problem is, neither of these actually fire, despite form-submit containing one, or both of those values. The values form-submit receives are: 'save', 'save-next', and 'skip-next' (which I have confirmed by looking at the post data as it comes in). Now for the real head scratcher, I also have this line in the same code chunk:
if ($_submit === 'add-comment'){
//do something
}
And that works perfectly fine. So === is working as expected, but !== is not?