Making a calculator

I need help with making a php calculator , i dont know how to do it . This is my html code :

<label>Getal 1</label>
<input type="text" name="bedrag" >
<br>

<input type="radio" name="btw"> Optellen

<input type="radio" name="btw"> Aftrekken

<input type="radio" name="btw"> Vermenigvuldigen

<input type="radio" name="btw"> Delen

<br>

<label>Getal 2</label>
<input type="text" name="bedrag" >

<br><br>

<input type="submit" name="submit" value="Berekenen">

so PHP has form handling and arithmetic operators

https://www.php.net/manual/en/tutorial.forms.php

https://www.php.net/manual/en/language.operators.arithmetic.php

Did you place all the form fields inside a form element? Did you add the method POST to the form field?

Sponsor our Newsletter | Privacy Policy | Terms of Service