Hey, I'm very new to PHP and I'm trying to create a form that posts data to a PHP document. Here's what I have so far:
form.html:
<form action="phpdoc.php" method="post">
<input type="checkbox" name="fun" value="yes" />Fun
<input type="checkbox" name="ent" value="yes" />Entertaining
<input type="checkbox" name="inf" value="yes" />Informative <br>
<input type="submit" name="formSubmit" value="Submit" />
</form>
phpdoc.php:
<?php
if(isset($_POST['fun']) &&
$_POST['fun'] == 'yes')
{
print "Try fdajkfda.";
}
else
{
print "You aren't fun.";
}
?>
The objective is to create a form with checkboxes, and so far, if you select the "fun" checkbox and submit the form, it will send the data to the phpdoc.php and the form will then print something depending on your selection. The problem is, the form isn't printing anything at all. This is a really amateur problem so I thank you for whatever help you can give