Skip to content

Instantly share code, notes, and snippets.

Created November 11, 2016 14:33
Show Gist options
  • Save anonymous/31b652587dd58fa50a2bb315eabb794e to your computer and use it in GitHub Desktop.
Save anonymous/31b652587dd58fa50a2bb315eabb794e to your computer and use it in GitHub Desktop.
<html>
<body>
<form action="#" method="post">
<label> <input type="checkbox" name="myCheck">FOUR 100 Watt</label>
<label> <input type="checkbox" name="myCheck1">EIGHT 100 Watt</label>
<label><input type="checkbox" name="myCheck2">FOUR 100 Watt LEd</label>
<label><input type="checkbox" name="myCheck3">EIGHT 100 Watt LEd</label>
<input type="submit" value="Submit" name="myButton">
</form>
<?php
$sum=0;
if(isset($_post['myCheck']))
{
$sum=$sum+200;
}
if(isset($_post['myCheck1']))
{
$sum=$sum+400;
}
if(isset($_post['myCheck2']))
{
$sum=$sum+600;
}
if(isset($_post['myCheck3']))
{
$sum=$sum+1000;
}
if(isset($_post['myButton']))
{
$sum = $sum+$sum*0.62;
echo $sum;
}
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment