How to display checked checkbox value in PHP? htmlCopy# html 5 <form action="index.php" method="post" > <input type="checkbox" name="test1" value="value1"> Option 1 <input type="checkbox" name="test2" value="value2"> Option 2 <input type="submit" value="Submit"> </form> #php 7.x <?php if(isset($_POST['test1'])){ echo "checked value1"."<br>"; } if(isset($_POST['test2'])){ echo "checked value2"; } ?> Curly hair, very fair, please share :)Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window)Click to share on Reddit (Opens in new window)Click to share on Telegram (Opens in new window)Click to share on WhatsApp (Opens in new window)Click to email a link to a friend (Opens in new window) Subash Chandran 29th November 2021 Leave a Comment