Welcome Guest, Not a member yet? Register   Sign In
$this->input->post() and 0 values
#1

[eluser]mikegioia[/eluser]
Hi Guys -

I have an interesting problem with the post data helper methods and having a value of 0 in the post variable.

CodeIgniter returns bool(false) if the item in the POST array doesn't exist. However, I'm also getting bool(false) if a value of 0 is passed through the post array. For example, someone is updating a field and wants to set it to 0.

The problem is I want to use the POST value if it was used and the session otherwise. I can't accurately check for values of 0 since both a 0 value and absence of the POST variable return the same thing. Can anyone shed some light on this?

Thanks,
Mike


Messages In This Thread
$this->input->post() and 0 values - by El Forum - 12-16-2009, 03:34 PM
$this->input->post() and 0 values - by El Forum - 12-16-2009, 03:42 PM
$this->input->post() and 0 values - by El Forum - 12-16-2009, 03:43 PM
$this->input->post() and 0 values - by El Forum - 12-16-2009, 11:11 PM
$this->input->post() and 0 values - by El Forum - 12-17-2009, 01:57 AM
$this->input->post() and 0 values - by El Forum - 12-17-2009, 08:37 AM
$this->input->post() and 0 values - by El Forum - 12-17-2009, 01:06 PM
$this->input->post() and 0 values - by El Forum - 12-17-2009, 11:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB