-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathacid.php
More file actions
57 lines (47 loc) · 1.77 KB
/
acid.php
File metadata and controls
57 lines (47 loc) · 1.77 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
54
55
56
57
<?php include_once('header.php');?>
<div class="container">
<div class="row">
<div class="span6">
<h2 class="title"><strong>THE STRENGTH OF ACID</strong></h2>
<form action="" method="post">
<div class="row controls">
<div class="span3 control-group">
<label>Enter the strength of the base in normality:-</label>
<input type="text" name="num1" maxlength="100" class="span3">
</div>
<br><br><br><br><br>
<div class="span3 control-group">
<label>Enter the volume of the acid in ml:- </label>
<input type="text" name="num2" maxlength="100" class="span3">
</div>
<br><br><br><br><br>
<div class="span3 control-group">
<label>Enter the volume of the base in ml:- </label>
<input type="text" name="num3" 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=$_POST['num3'];
$num4=$num1*$num2;
echo "The strength of base is:-" .number_format($num4/$num3,4)."N";
}
?>
</h4>
</div>
</div>
</div>
</div>
<?php include_once('footer.php');?>