This repository has been archived by the owner on Nov 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUpdateSeverity.php
49 lines (48 loc) · 2.17 KB
/
UpdateSeverity.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
<?php
include('session.php');
include('SQLFunctions.php');
$table = 'severity';
$q = $_POST["q"];
$title = "SVBX - Update Severity";
$Loc = "SELECT SeverityName, severityDescrip FROM $table WHERE SeverityID = ".$q;
include('filestart.php');
$link = f_sqlConnect();
if($role <= 20) {
header('location: unauthorised.php');
}
?>
<header class="container page-header">
<h1 class="page-title">Update Severity</h1>
</header>
<?php if($stmt = $link->prepare($Loc)) {
$stmt->execute();
$stmt->bind_result($SeverityName, $Description);
while ($stmt->fetch()) {
echo "
<div class='container'>
<form action='UpdateSeverityCommit.php' method='POST'>
<input type='hidden' name='SeverityID' value='".$q."'>
<table class='table'>
<tr class='usertr'>
<th class='userth'>Severity Name:</th>
<td class='usertd'>
<input type='text' name='SeverityName' maxlength='50' required value='".$SeverityName."'/>
</td>
</tr>
<tr class='usertr'>
<th coldpan='2' class='userth'>Severity Description:</th>
<td class='usertd'>
<textarea type='message' rows='5' cols='99%' name='Description' max='255' required>$Description</textarea>
</td>
</tr>
</table>
<input type='submit' value='submit' class='btn btn-primary btn-lg'/>
<input type='reset' value='reset' class='btn btn-primary btn-lg' />
</form>
</div>";
}
} else {
echo '<br>Unable to connect';
exit();
}
include('fileend.php') ?>