forked from monika-gautam/Bill-App-Latest-version
-
Notifications
You must be signed in to change notification settings - Fork 0
/
billHistory.php
90 lines (90 loc) · 2.66 KB
/
billHistory.php
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<html>
<head>
<title> Bill Claims Management Application</title>
<link rel="stylesheet" type="text/css" media="all" href="/jsdate/jsDatePick_ltr.min.css" />
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/pure-min.css">
<script type="text/javascript" src="/jsdate/jsDatePick.min.1.3.js"></script>
<script language="javascript">
function sdate(){
//alert("aaa");
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
//alert("no error");
document.getElementById("mydiv").innerHTML = xmlhttp.responseText;
}
};
var id=encodeURIComponent(document.myForm.id.value);
var parameters="id="+id;
xmlhttp.open("POST","ajaxShow_date.php",true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send(parameters);
}
function home(){
document.myForm.action="cabBills.html";
document.myForm.submit();
}
function myresult(){
var v =document.myForm.dateval.value;
if(v=="none")
alert("Select a Date");
else{
document.myForm.action="billClaim_history.php";
document.myForm.submit();
}
}
</script>
</head>
<body>
<form class="pure-form pure-form-stacked" name="myForm" method="post">
<center>
<br>
<h2><legend>Enter details to see historical data</legend></h2>
<?php
$dbhandle = mysqli_connect("localhost", "root", "mysql","cabBills")
or die("Unable to connect to MySQL");
$s1="select distinct id from employee";
$r1= mysqli_query($dbhandle,$s1);
?>
<br>
<br>
<div id="mydiv">
<table class="pure-table pure-table-bordered">
<thead>
<tr>
<th>Employee ID:</th>
<td>
<select name="id" onchange="sdate()">
<option selected value="none">Choose ID</option>
<?
while ($row11 = mysqli_fetch_array($r1,MYSQLI_NUM))
{
?>
<option value="<? echo $row11{0} ?>"> <? echo $row11{0} ?> </option>
<?
}
?>
</select>
</tr>
</thead>
<tbody>
<tr>
<th>Bill Submission Date:</th>
<td> <input type="text" name="dateval" id="dateval" readonly>
</td>
</tr>
</tbody>
</table>
<br>
<center>
<input type="button" class="pure-button pure-button-primary" value="Back" onClick="home()"/>
</div>
</form>
</body>
</html>