-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditcat.php
83 lines (69 loc) · 1.81 KB
/
editcat.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
<?php
session_start();
if (!isset($_SESSION['SESS_MEMBER'])) {
# code...
header('Location:login.php');
}
?>
<?php
require_once('class/category.php');
$cat= new category();
$data['allcats'] = $cat->getAllCategory();
?>
<!DOCTYPE html>
<html>
<head>
<title>Edit Category</title>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/adminstyle.css">
<style>
table, th, td
{
border: 1px solid black;
border-collapse: collapse;
}
th, td
{
padding: 10px;
}
</style>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<?php include('include/nav2.php'); ?>
</nav>
<form class="all add-cat" action="choose.php" method="post">
<fieldset>
<legend>Edit Category</legend>
<table>
<tr>
<td>Checkbox</td>
<td>Number</td>
<td>Category Name</td>
</tr>
<?php
foreach ($data['allcats'] as $value) {
$i=0;
?>
<tr>
<td>
<input type="radio" name="catid" value="<?php echo $value['category_id']; ?>"><br>
</td>
<td>
<?php echo $i; ?>
</td>
<td>
<?php echo $value['category_name']; ?>
</td>
</tr>
<?php $i++; }?>
</table>
<br>
<input class="btn btn-default" type="submit" name="submit" value="Update"/>
<a class="btn btn-default back-btn" href="updatecat.php" role="button"><-Back</a>
</fieldset>
</form>
</body>
<script src="js/jquery.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
</html>