So I have a form for a contest:
<form action="http://asilenttreatment.org/flashtest/emailtest.php" method="post" requirelogin=0>
<br>
Name: <br>
<input type="text" name="name">
<br>
Email: <br>
<input type="text" name="email">
<br>
Recipe Name: <br>
<input type="text" name="recipename">
<br>
Recipe: <br>
<input type="text" name="recipe">
<br>
I have read and agreed to the <a href="http://asilenttreatment.org/flashtest/tos.html" target="_blank">Terms and Conditions</a>:
<input type="checkbox" name="tos" value="tos1"><br>
<input type="submit">
That submits to a PHP file:
<?
//POST passes everything, synatx is $variablename=$_POST['variableinflash']
$s_lb="\n";
$s_name=$_POST['name'];
$s_email=$_POST['email'];
$s_recipename=$_POST['recipename'];
$s_recipe=$_POST['recipe'];
$s_cbox=$_POST['tos'];
echo $s_tos;
//echo $s_name;
//echo $s_email;
//echo $s_recipe;
//echo $s_recipename;
//Create a variable "bodytext" that is the userse-mail,\n,recipename,\n,recipe
$s_bodytext=$s_email.$s_lb.$s_name.$s_lb.$s_recipename.$s_lb.$s_recipe;
echo $s_bodytext;
//Send mail
mail("myemail","SummerSandwichContest",$s_bodytext);
?>
Simple. But I want to check and make sure that the Checkbox is 'checked'. I know Checkboxes pass no value if they're unchecked, but how do I capture a value to check in the first place? This is like the first bit of programming I've done in like 7 years, so help a bro out, yo.