Vote Up 0 Vote Down

html checkbox value php

How to check html checkbox value in php ?


Vote Up 0 Vote Down
HTML checkbox in a form can be given as follow :

<input type="checkbox" name="comment" value="yes">

When you post values from HTML form you can get the post value as follows :

$value = $_POST['comment'];
echo $value; //Print "yes" if value is checked, empty otherwise.
flag | link |

Your Answer

Login before answering

Login with facebook