You want to calculate the discount

There is the initial price and the discount input field

$Z1= $Z want to multiply by input and divide by 100

Well, then withdraw

$Z2=$Z-$Z1

and I'm interested in the simple question, how to get the value entered in the form

There is the initial price and the discount input field

```
<form action='v.php?ix=lbgDB52SK23&p0=$p0&iD=$id_pac' method='post'>
<a>the Price is: $Z</a>
Discount <input name='s' size='3'></input>%
the result : $Z2
</form>
```

$Z1= $Z want to multiply by input and divide by 100

Well, then withdraw

$Z2=$Z-$Z1

and I'm interested in the simple question, how to get the value entered in the form

`<input name='s'`

asked March 19th 20 at 08:36

1 answer

answered on

Solution

After you submit the form the value entered in a input will be available in the variable

`$_POST['s']`

Find more questions by tags PHP

POST method... - mollie_Nitzsche commented on March 19th 20 at 08:41Enter to input a percentage and it immediately calculates in $Z2 well, and then the final amount to be transferred is sent.

I understand that I need to get this input and starting point of $Z taken out of the form?And the form itself have to pass $Z2? - Rylee.Brekk commented on March 19th 20 at 08:44