PHPで電卓を作成していますが、このようなHTML構造で、数値はクリック可能なボタンであり、最初にクリックされた数値が最初の値になり、2番目にクリックした数値が2番目の値になります。 。それがどのように機能するのかわかりませんが、可能ですか?もしそうなら、これが私のコードです
<html>
<head>
<title>Calculator</title>
</head>
<body>
<div id = "structure">
<?php
if(isset($_GET)){
$value += $_GET;
}
?>
<form method = "GET " action = "calculator.php">
<input type = "submit" name = "one" value = 1>
<input type = "submit" name = "two" value = 2>
<input type = "submit" name = "three" value = 3>
<input type = "submit" name = "operand" value = "+">
</br>
<input type = "submit" name = "four" value = 4>
<input type = "submit" name = "five" value = 5>
<input type = "submit" name = "six" value = 6>
<input type = "submit" name = "operand" value = "-">
</br>
</form>
</div>
</body>
</html>
投稿のために電卓にすべての数字を入れていません