-
Notifications
You must be signed in to change notification settings - Fork 0
/
problem-form.php
124 lines (110 loc) · 4.13 KB
/
problem-form.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<link rel="stylesheet" type="text/css" href="home.css">
<title>Problem Form</title>
<style>
* {
box-sizing: border-box;
}
body {
background-color: #f1f1f1;
}
#regForm {
background-color: #ffffff;
margin: 100px auto;
font-family: Raleway;
padding: 40px;
width: 70%;
min-width: 300px;
}
h1 {
text-align: center;
}
textarea{
font-family: Raleway;
font-size: 17px;
}
input {
padding: 10px;
width: 100%;
font-size: 17px;
font-family: Raleway;
border: 1px solid #aaaaaa;
}
/* Mark input boxes that gets an error on validation: */
input.invalid {
background-color: #ffdddd;
}
</style>
<body>
<!-- NAVBAR -->
<nav class="navbar navbar-default navbar-dark bg-d">
<a class="navbar-brand" href="finalhomepage.php">Make-It-All</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="finalhomepage.php">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item active">
<a class="nav-link" href="logCall.html">Log Call</a>
</li>
<li class="nav-item">
<a class="nav-link" href="allProblems.html">Live Jobs</a>
</li>
<li class="nav-item">
<a class="nav-link" href="reports.php">Analytics</a>
</li>
</ul>
<ul>
<ul class="nav navbar-nav" style="float: right">
<button class="btn btn btn-danger" type="button" onclick="location.href = 'index.html'">Sign Out</button>
</ul>
</ul>
</div>
</nav>
<!-- END NAVBAR -->
<form id="regForm" action="log_problem.php" method="get">
<h1>Problem log:</h1>
<div class="tab">
<div align="center">
<div style="display: inline-block; text-align: left;">
<p>Type:</p>
<p>
<select name="type" style="width:200px">
<?php
$servername = "localhost";
$username = "root";
$password = "SIpnz0Sjel";
// Create connection
$conn = mysqli_connect($servername, $username, $password, 'team018');
$sql="select * from problem_type";
$res = mysqli_query($conn, $sql);
if (mysqli_num_rows($res) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($res)) {
echo "<option value=".$row['type'].">" . $row['type'] . "</option>";
}
} else {
echo "0 results";
}
?>
</select>
</p>
<p><input placeholder="Serial Number.." oninput="this.className = ''" name="serial_no" style="width:200px"></p>
<p><textarea name="description" rows="4" cols="50" placeholder="Description..."></textarea></p>
<button type="submit" class="btn btn-primary" id="submit">Submit</button>
</div>
</div>
</div>
</form>
</body>
</html>