-
Notifications
You must be signed in to change notification settings - Fork 0
/
eliminarproductos.php
58 lines (54 loc) · 1.49 KB
/
eliminarproductos.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
<!DOCTYPE html>
<html>
<head>
<title>INVENTARIO || ELIMINAR PRODUCTOS</title>
<center><IMG SRC="./img/vr.jpg"><H1></center>
</head>
<font face="Arial, Helvetica, sans-serif">
<body bgcolor="#333333">
<center>
<table border="0">
<thead>
<tr bgcolor="#CCCCCC">
<th colspan="9">DATOS DE PRODUCTOS</th>
</tr>
</thead>
<tbody>
<tr bgcolor="#505458">
<td>CODIGO</td>
<td>NOMBRE</td>
<td>TOTAL PRODUCTOS</td>
<td>PRECIO UNIDAD</td>
<td>PROVEEDOR</td>
<td>ELIMINAR</td>
</tr>
<?php
include("conecta.php");
$con=conectar();
$total = 0;
$query="SELECT cod_prod,nom_prod,prec_prod,prov_prod, SUM(cant_prod) AS Total FROM productos GROUP BY cod_prod";
$resultado= $con->query($query);
while($row= $resultado->fetch_assoc()){
?>
<tr bgcolor="#B9BCBF">
<td><?php echo $row['cod_prod'];?></td>
<td><?php echo $row['nom_prod'];?></td>
<td><?php echo $row['Total'];?></td>
<td><?php echo $row['prec_prod'];?></td>
<td><?php echo $row['prov_prod'];?></td>
<td><a href="eliminar.php?cod_prod=<?php echo $row['cod_prod'];?>"><img src="./img/eliminar.png" border="0"></a></td>
</tr>
<?php
}
?>
</tbody>
</table>
<br>
<center>
<form action="inicio.html">
<td colspan="10" align="center"><input type="submit" value="INICIO" onclick="inicio.html"></td>
</center>
</center>
</body>
</font>
</html>