Monday, 08 April 2013 13:55

how to check whether checkbox is checked or not

Written by 
Rate this item
(0 votes)

there are many ways to do of them is as
follows -

You need to check if the value of the checkbox is
set or not by isset function of php.

as an example let us declare a checkbox in the
page html -

Human:<input type="checkbox" name="Human" value="male"/>

now we need to use php isset function to know
whether or not checkbox checked by the follwing
way -

if (isset($_POST['Human']))
// do what next

hope this helps.

Read 2924 times
Super User

Email This email address is being protected from spambots. You need JavaScript enabled to view it.

Latest discussions

  • No posts to display.