<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>KALKULATOR</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='stylesheet' type='text/css' media='screen' href='main1.css'>
<script src='main.js'></script>
</head>
<body>
<table class="tabela">
<tr>
<td colspan="4" class="wyswietlacz">
Działanie: <?php
if (isset($_SESSION['liczba'])){ echo $_SESSION['liczba']; }
?>
<br>
Wynik:
<?php
if (isset($_SESSION['dodawanie'])){ echo $_SESSION['dodawanie']; unset($_SESSION['dodawanie']);
}
if (isset($_SESSION['odejmowanie'])){ echo $_SESSION['odejmowanie']; unset($_SESSION['odejmowanie']);
}
if (isset($_SESSION['mnozenie'])){ echo $_SESSION['mnozenie']; unset($_SESSION['mnozenie']);
}
if (isset($_SESSION['dzielenie'])){ echo $_SESSION['dzielenie']; unset($_SESSION['dzielenie']);
}
?>
</td>
</tr>
<tr>
<td>
<form action="kalk.php" method="get">
<input type=submit value="1" class="input"/>
<input type="hidden" name="wynik" value= "1" />
</form>
</td>
<td>
<form action="kalk.php" method="get">
<input type=submit value="2" class="input"/>
<input type="hidden" name="wynik" value="2" />
</form>
</td>
<td>
<form action="kalk.php" method="get">
<input type=submit value="3" class="input"/>
<input type="hidden" name="wynik" value="3" ?>
</form>
</td>
<td>
<form action="kalk.php" method="get">
<input type=submit value="C" class="input"/>
<input type="hidden" name="wynik" value="C" ?>
<input type="hidden" name="zn" value="kasowanie"/>
</form>
</td>
</tr>
<tr>
<td>
<form action="kalk.php" method="get">
<input type=submit value="4" class="input"/>
<input type="hidden" name="wynik" value="4" ?>
</form>
</td>
<td>
<form action="kalk.php" method="get">
<input type=submit value="5" class="input"/>
<input type="hidden" name="wynik" value="5" ?>
</form>
</td>
<td>
<form action="kalk.php" method="get">
<input type=submit value="6" class="input"/>
<input type="hidden" name="wynik" value="6" ?>
</form>
</td>
<td>
<form action="kalk.php" method="get">
<input type=submit value="-" class="input"/>
<input type="hidden" name="wynik" value="-" ?>
<input type="hidden" name="zn" value="minus"/>
</form>
</td>
</tr>
<tr>
<td>
<form action="kalk.php" method="get">
<input type=submit value="7" class="input"/>
<input type="hidden" name="wynik" value="7" ?>
</form>
</td>
<td>
<form action="kalk.php" method="get">
<input type=submit value="8" class="input"/>
<input type="hidden" name="wynik" value="8" ?>
</form>
</td>
<td>
<form action="kalk.php" method="get">
<input type=submit value="9" class="input"/>
<input type="hidden" name="wynik" value="9" ?>
</form>
</td>
<td>
<form action="kalk.php" method="get">
<input type=submit value="+" class="input"/>
<input type="hidden" name="wynik" value="+" ?>
<input type="hidden" name="zn" value="plus"/>
</form>
</td>
</tr>
<tr>
<td>
<form action="kalk.php" method="get">
<input type=submit value="." class="input"/>
<input type="hidden" name="wynik" value="." ?>
</form>
</td>
<td>
<form action="kalk.php" method="get">
<input type=submit value="/" class="input"/>
<input type="hidden" name="wynik" value="/" ?>
<input type="hidden" name="zn" value="dzielenie"/>
</form>
</td>
<td>
<form action="kalk.php" method="get">
<input type=submit value="0" class="input"/>
<input type="hidden" name="wynik" value="0" ?>
</form>
</td>
<td>
<form action="kalk.php" method="get">
<input type=submit value="=" class="input"/>
<input type="hidden" name="wynik" value="=" ?>
<input type="hidden" name="zn" value="rowna"/>
</form>
</td>
</tr>
<tr>
<td>
<form action="kalk.php" method="get">
<input type=submit value="*" class="input"/>
<input type="hidden" name="wynik" value="*" ?>
<input type="hidden" name="zn" value="mnozenie"/>
</form>
</td>
<td>
<form>
<input type=submit value=" " class="input"/>
</form>
</td>
<td>
<form>
<input type=submit value=" " class="input"/>
</form>
</td>
<td>
<form>
<input type=submit value=" " class="input"/>
</form>
</td>
</tr>
</table>
</body>
</html>
</html>