-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsua_sp.php
More file actions
95 lines (94 loc) · 2.56 KB
/
Copy pathsua_sp.php
File metadata and controls
95 lines (94 loc) · 2.56 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
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
<?php
session_start();
if(isset($_POST['update'])) {
$mshh = $_POST['mshh'];
$tenhh = $_POST['tenhh'];
$gia = $_POST['giahh'];
$soluong = $_POST['soluonghang'];
$manhom = $_POST['manhom'];
$file = $_FILES['hinh'];
$file_name = $file['name'];
move_uploaded_file($file['tmp_name'],'./pic/'.$file_name);
$mota = $_POST['mota'];
require 'connect.php';
$sql = "UPDATE hanghoa SET tenhh = '$tenhh', motahh = '$mota', gia = '$gia', hinh = '$file_name' WHERE mshh = '$mshh'";
$con -> query($sql);
}
?>
<!DOCTYPE html>
<html>
<head>
<meta name = "viewport" content = "with=device-width, inital-scale=1.0">
<title>Sửa sản phẩm</title>
<link rel = "stylesheet" href = "./css/style_adminn.css">
</head>
<body>
<div id="frame-top">
<div id="logo">
<a href="#">
<img src="./pic/logoip.png" alt="">
</a>
</div>
<div id="A">
<p>QUẢN LÝ CỬA HÀNG</p>
</div>
</div>
<div id="frame-menu">
<ul>
<li><a href="index.php">Trang chủ</a></li>
<li><a href="admin.php">Thêm Sản Phẩm</a></li>
<li><a href="ds_sp.php">DS sản phẩm</a></li>
<li><a href="ql_nhanvien.php">QL Nhân viên</a></li>
</ul>
</div>
<div id = "wrap">
<div id = "title">
<h2>Sửa sản phẩm</h2>
</div>
<p>Vui lòng điền đầy đủ thông tin bên dưới để sửa sản phẩm</p><br>
<div id = "content">
<form method = "POST" enctype="multipart/form-data">
<table>
<tr>
<td>Mã hàng hóa</td>
<td><input type="text" name="mshh"></td>
</tr>
<tr>
<td>Tên hàng hóa</td>
<td><input type = "text" name ="tenhh"></td>
</tr>
<tr>
<td>Giá hàng hóa</td>
<td><input type = "text" name = "giahh"> (.000 VNĐ)</td>
</tr>
<tr>
<td>Số lượng hàng hóa</td>
<td><input type="text" name="soluonghang"></td>
</tr>
<tr>
<td>Mã nhóm</td>
<td><input type="text" name="manhom"></td>
</tr>
<tr>
<td>Hình sản phẩm</td>
<td><input type = "file" name = "hinh"></td>
</tr>
<tr>
<td>Mô tả</td>
<td><textarea name = "mota" rows = "5" cols = "40"></textarea></td>
</tr>
<tr>
<td></td>
<td>
<input class = "but" type = "submit" name = "update" value = "Cập nhật">
<input class = "but" type = "reset" name = "lamlai" value = "Làm lại">
</td>
</tr>
</table>
</form>
</div>
<div id = "footer">
<div>
</div>
</body>
</html>