Welcome Guest, Not a member yet? Register   Sign In
Color and Size Filter
#2

(This post was last modified: 03-31-2018, 09:00 AM by InsiteFX. Edit Reason: Add code sample. )

Check boxes and radio buttons have no setting at all if they are not checked.

You need to first check to see if the check box or radio button is checked
or empty before you do anything else in your code.

PHP Code:
if ( ! empty($this->input->post("checkBoxName")))
{
 
   echo "Checkbox is checked";
}
else
{
 
   echo "Checkbox is unchecked.";


You could also us isset etc;

The thing is you need to check to make sure it is checked.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
Color and Size Filter - by msz900 - 03-30-2018, 07:58 PM
RE: Color and Size Filter - by InsiteFX - 03-31-2018, 04:07 AM
RE: Color and Size Filter - by msz900 - 03-31-2018, 08:33 AM
RE: Color and Size Filter - by InsiteFX - 04-01-2018, 04:15 AM
RE: Color and Size Filter - by msz900 - 04-01-2018, 04:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB