-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhcl.php
More file actions
53 lines (43 loc) · 1.67 KB
/
Copy pathhcl.php
File metadata and controls
53 lines (43 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php include_once('header.php');?>
<div class="container">
<div class="row">
<div class="span6">
<h2 class="title"><strong>HYDROCHLORIC ACID</strong></h2>
<form action="" method="post">
<div class="row controls">
<div class="span3 control-group">
<label>Enter the volume of the mixture you want to produce in ml:- </label>
<input type="text" name="num1" maxlength="100" class="span3">
</div>
<br><br><br><br><br>
<div class="span3 control-group">
<label>Enter the strength of your required solution in normality:- </label>
<input type="text" name="num2" maxlength="100" class="span3">
</div>
<br><br><br><br><br>
</div>
<div class="btn-toolbar">
<input type="submit" name="submit" value="Calculate" ><br><br><br>
</div>
</form>
</div>
<div class="span6">
<h2><strong>Result</strong></h2 >
<h4>
<?php
if(isset($_POST['submit']))
{
$num1=$_POST['num1'];
$num2=$_POST['num2'];
$num3=12.00;
$num4=$num2*$num1;
$num5=$num4/$num3;
echo "The amount of acid is:- ".number_format($num5,4)."ml <br><br> The amount of water you have to give to make the required solution is:- ".number_format($num1-$num5,4)."ml";
}
?><br>
</h4>
</div>
</div>
</div>
</div>
<?php include_once('footer.php');?>