I am just tottaly newbie with PHP and I am now learning how to combine PHP with HTML form. I wanted it in one file, so I tried this:
<?php
if(isset($_POST['button'])){ //check if form was submitted
$pohlavie = $_POST['gender']; //get input text
$plat = $_POST['salary']; //get input text
$plat = "Your gender is ".$pohlavie." and your salary is ".$plat;
}
?>
<center><h1>TAXES</h1></center>
<form action="" method="post">
Name: <input type="text" name="name"><br>
<input type="radio" name="gender" value="female"> Female<br>
<input type="radio" name="gender" value="male"> Male<br>
Salary: <input type="number" name="salary"><br>
<button type="submit" name="button" formmethod="post">Calculate DPH</button>
</form>
Unfortunately, it's literally doing nothing after submitting. Can you please help me a little bit?