Welcome Guest, Not a member yet? Register   Sign In
Adding data to $_POST
#1

[eluser]Majd Taby[/eluser]
Hey, I have a checkbox, I want the checkbox to pass 0 in the POST array if it's not checked, and 1 if it is.

The problem is, checkbox's don't pass anything if they're not selected, as if they're not even in the form. So what i need to do is add it. AFAIK, accessing POST directly is bad practice, so i tried this:

$this->input->post('confidential') = intval($this->input->post('confidential'));

But that gives me an error:

Fatal error: Can't use method return value in write context in /Users/majd/Sites/cap1_wc/trunk/system/application/backend/controllers/BusinessListings.php


What do you guys think?


Messages In This Thread
Adding data to $_POST - by El Forum - 10-12-2007, 06:09 PM
Adding data to $_POST - by El Forum - 10-12-2007, 06:33 PM
Adding data to $_POST - by El Forum - 10-12-2007, 06:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB