The Daily Insight

Connected.Informed.Engaged.

news

,How can pass checkbox value 0 if not checked and 1 if checked using PHP?,3 Answers. Inputs need to have the same name. If the checkbox is checked then value 1 will be submitted, check these out |

Written by Matthew Barrera — 0 Views

otherwise value 0 from the hidden input. I used a ternary operator to set the value on checked and unchecked condition.