# can anyone help me to solve this? I'm a beginner can't really figure out how to do it

## Recommended Posts

```<!DOCTYPE html>
<html>
<body>
<form action="Practice 1.1.php" method="post">
Catagory Code:<input type="text" name="n" size="2"><br>
Units Used <input type="text" name="u" size="2">
<br>
<input type="submit" value="Calculate">
</form>
<?php
\$a=\$_POST['n'];
\$b=\$_POST['u'];
if (\$b<=3.75) {
echo "";
}

?>
</body>
</html>```

##### Share on other sites

Did you mark your own post as being "the solution" because you figured out the answer yourself? Or are you still having problems?

##### Share on other sites

Sorry, don't know a solution that will give you 914.01.

##### Share on other sites
3 hours ago, Barand said:

Sorry, don't know a solution that will give you 914.01.

Almost: 4.19 * first 75 units (314.25) + 5.72 * next 92 units (526.24) + 30 flat charge = 870.49, +5% VAT = 914.01

##### Share on other sites

DOH! 🙄 Forgot to include the flat charge in the spreadsheet total formula (copied the "Units" total formula) and also completely missed the VAT element.

Thus demonstrating the perils of copy/paste - a warning to all.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Restore formatting

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×

• #### Activity

• Chat
×
• Create New...