09-06-2012, 06:11 AM
[eluser]RecoilUK[/eluser]
Hi guys
I have a piece of code that I am having issue's with ...
post['char'] can be anything in the range of A-Z and 0-9
Now the problem comes when post['char'] is zero, as it validates to FALSE and then sets $character as A.
How can I stop this?
Any help would be appreciated.
Thanks
Hi guys
I have a piece of code that I am having issue's with ...
post['char'] can be anything in the range of A-Z and 0-9
Code:
if(!$this->input->post('char') === FALSE) {
$character = $this->input->post('char');
} else {
$character = "A";
}
Now the problem comes when post['char'] is zero, as it validates to FALSE and then sets $character as A.
How can I stop this?
Any help would be appreciated.
Thanks