<div style="display: table;">
<div style="min-width: 50%; dispaly: block;">
<form action="quiz.php" method="post">
<h1>ADDITION</h1>
<label>First Number:</label>
<input type="Text" name="a1" value=""><br>
<label>Second Number:</label>
<input type="Text" name="a2" value=""><br>
<input type="submit" name="a" value="SUBMIT">
</form>
</div>
<div style="min-width: 50%; dispaly: block;">
<form action="quiz.php" method="post">
<h1>SUBTRACTION</h1>
<label>First Number:</label>
<input type="Text" name="s1" value=""><br>
<label>Second Number:</label>
<input type="Text" name="s2" value=""><br>
<input type="submit" name="s" value="SUBMIT">
</form>
</div>
<div style="min-width: 50%; dispaly: block;">
<form action="quiz.php" method="post">
<h1>MULTIPLICATION</h1>
<label>First Number:</label>
<input type="Text" name="m1" value=""><br>
<label>Second Number:</label>
<input type="Text" name="m2" value=""><br>
<input type="submit" name="m" value="SUBMIT">
</form>
</div>
<div style="min-width: 50%; dispaly: block;">
<form action="quiz.php" method="post">
<h1>DIVISION</h1>
<label>First Number:</label>
<input type="Text" name="d1" value=""><br>
<label>Second Number:</label>
<input type="Text" name="d2" value=""><br>
<input type="submit" name="d" value="SUBMIT">
</form>
</div>
</div>
<?php
if(isset($_POST['a']))
{
$a1 = $_POST['a1'];
$a2 = $_POST['a2'];
$add = $a1+$a2;
echo "YOU HAVE CHOSEN ADDITION"."<br";
echo "The first number is: ".$a1."<br>";
echo "The second number is: ".$a2."<br>";
echo "The answer is ".$add;
}
if(isset($_POST['s']))
{
$s1 = $_POST['s1'];
$s2 = $_POST['s2'];
$sub = $s1-$s2;
echo "YOU HAVE CHOSEN SUBTRACTION"."<br";
echo "The first number is: ".$s1."<br>";
echo "The second number is: ".$s2."<br>";
echo "The answer is ".$sub;
}
if(isset($_POST['m']))
{
$m1 = $_POST['m1'];
$m2 = $_POST['m2'];
$MUL = ($m1)*($m2);
echo "YOU HAVE CHOSEN ADDITION"."<br";
echo "The first number is: ".$m1."<br>";
echo "The second number is: ".$m2."<br>";
echo "The answer is ".$MUL;
}
if(isset($_POST['d']))
{
$d1 = $_POST['d1'];
$d2 = $_POST['d2'];
$DIVIDE = $d1=$d2;
echo "YOU HAVE CHOSEN ADDITION"."<br";
echo "The first number is: ".$d1."<br>";
echo "The second number is: ".$d2."<br>";
echo "The answer is ".$DIVIDE;
}