forked from obetancourthunicah/IF412NegociosWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathej8.php
52 lines (52 loc) · 1.27 KB
/
ej8.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
<?php
// #include c++
// import c#
// using vb
// require_once php
require_once("ado.php");
$sqlstr = "Select * from productos;";
$productos = obtenerRegistros($sqlstr);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Trabajar con Productos</title>
</head>
<body>
<h1>Productos</h1>
<a href="ej9.php?action=new">Nuevo Producto</a>
<table>
<tr>
<th>Código</th>
<th>Producto</th>
<th>CB</th>
<th>Inventario</th>
<th>Estado</th>
<th>Categoría</th>
<th>Update</th>
<th>Delete</th>
</tr>
<?php
/*
prdid
prddsc
prdbrc
prdctd
prdest
ctgid
*/
foreach($productos as $producto){
echo "<tr><td>".$producto["prdid"]."</td>";
echo "<td>".$producto["prddsc"]."</td>";
echo "<td>".$producto["prdbrc"]."</td>";
echo "<td>".$producto["prdctd"]."</td>";
echo "<td>".$producto["prdest"]."</td>";
echo "<td>".$producto["ctgid"]."</td>";
echo '<td><a href="ej9.php?action=upd&prdid='.$producto["prdid"].'"> -> </a></td>';
echo '<td><a href="ej9.php?action=del&prdid='.$producto["prdid"].'"> -> </a></td></tr>';
}
?>
</table>
</body>
</html>