Welcome Guest, Not a member yet? Register   Sign In
Post vars problem
#1

[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

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


Messages In This Thread
Post vars problem - by El Forum - 09-06-2012, 06:11 AM
Post vars problem - by El Forum - 09-06-2012, 06:20 AM
Post vars problem - by El Forum - 09-06-2012, 06:23 AM
Post vars problem - by El Forum - 09-06-2012, 06:25 AM
Post vars problem - by El Forum - 09-06-2012, 06:28 AM
Post vars problem - by El Forum - 09-06-2012, 11:21 AM
Post vars problem - by El Forum - 09-06-2012, 05:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB