How to read if a checkbox is checked in PHP?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Is there a way to play audio on a mobile browser w
Learn about
isset
which is a built in "function" that can be used in if statements to tell if a variable has been used or setExample:
Let your html for your checkbox will be like
Then after submitting your form you need to check like
Assuming that
check1
should be your checkbox name.And if your form submitting method isGET
then you need to check with$_GET
variables like