• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.