0

Sorry if this is a noob question, I just started learning to work in PHP and MySQL. I have a table that contain some rows of dummy data that is for employees.

this is how it looks like (for a reason the virtual machine won't let me copy paste from MariaDB)

I want to make a page where I will ask the user to provide a number ( that will be the percentage for taxes) and then to show for each employee how much money they owe based on that percentage and their base salary also(this is from the table).

I got stuck after making a POST method because I cannot figure it out how the SQL query should be like and how to display what I want. The POST method was configured as follows:

<form action="taxes.php" method="post">
Percentage: <input type="number" name="percentage"><br>
<input type="submit">
</form>

How the SQL query should be configured to run my calculation for each employee? Any extras would be appreciated :)

0 Answers0