New to PHP programming. This assignment is for one of my college classes.
Goal:
Using XAMPP
Here is the code that I currently have:
Goal:
Using XAMPP
Here is the code that I currently have:
Code:
<?php
$testscore1 = $_POST['testscore1'];
$testscore2 = $_POST['testscore2'];
$testscore3 = $_POST['testscore3'];
$testscore4 = $_POST['testscore4'];
?>
<html>
<link rel="stylesheet" type="text/css" href="addfournumbers.css">
<title>Test Score Calculator</title>
<body>
<center><form action="addfournumbers.php" method="POST">
Score 1: <input type="text" name="testscore1" value="0"></br>
Score 2: <input type="text" name="testscore2" value="0"></br>
Score 3: <input type="text" name="testscore3" value="0"></br>
Score 4: <input type="text" name="testscore4" value="0"></br>
<input type="submit" value="Calculate values"></br>
</form>
Answer: <?php echo ($testscore1 + $testscore2 + $testscore3 + $testscore4);
?>
</center>
</body>
</html>