Created
November 11, 2016 14:28
-
-
Save anonymous/6f4f0ab896601fd914d212addb68e3fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<form action="#" method="post"> | |
<label> <input type="checkbox" id="myCheck">FOUR 100 Watt</label> | |
<label> <input type="checkbox" id="myCheck1">EIGHT 100 Watt</label> | |
<label><input type="checkbox" id="myCheck2">FOUR 100 Watt LEd</label> | |
<label><input type="checkbox" id="myCheck3">EIGHT 100 Watt LEd</label> | |
<input type="submit" value="Submit" id="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