no carga de la bd al combo
Publicado por Javier (30 intervenciones) el 17/02/2019 20:03:42
buenas tardes tengo un error que no logro ver donde esta, pero el combo no se alimente de la bd al combo estoy usando postgresql agreco su orientacion
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
<!DOCTYPE HTML>
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html" charset="UTF-8" /> <!-- charset="ISO-8859-1" por si acaso tambien pudiera servir este-->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
<link rel="stylesheet" href="css/estilo_m.css" />
<link rel="stylesheet" href="css/estilo_pie_pag.css" />
<link rel="stylesheet" href="css/estilo_plantilla_mc.css" />
<link rel="stylesheet" href="css/estilo_plantilla_tabla3.css" />
<link href="css/calendario.css" type="text/css" rel="stylesheet"/>
<script src="js/calendar.js" type="text/javascript"></script>
<script src="js/calendar-es.js" type="text/javascript"></script>
<script src="js/calendar-setup.js" type="text/javascript"></script>
<script src="js/jquery-1.12.1.min.js"></script>
<script src="js/jquery-ui.js"></script>
<title>Materiales de Construcción</title>
</head>
<body>
<?php
include ('menu_principal.php');
?>
<form class="mod_agregar_formula" id="mod_agregar_formula" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="mod_agregar_formula" autocomplete="off">
<div class="contenedor_p">
<label class="titulo">      AGREGAR FORMULA</label><br /><br /><br /><br />
<input class="nombre" placeholder="Nombre del Producto" name="nomb_produ" type="text" value="<?php if (isset($nomb_produ)) {echo utf8_encode(trim($nomb_produ));}?>" maxlength="30" /><br />
<label class ="etiqueta_3" for="name">Producto</label>
<select name="combo3_3" class="combo_3" size="1"> <!-- AQUI SE DEBERIA CARGAR EL COMBO DE LA BD-->
<?php
include('bd_conexion.php');
$sql4 = "SELECT nombre_producto FROM producto WHERE estatus_producto = 'a' GROUP BY nombre_producto ORDER BY nombre_producto";
$result4 = pg_query($sql4);
echo "<option>"."---------------"."</option>";
while($fila=pg_fetch_array($result4)) {
if ($combo3_3==$fila['nombre_producto']) {
echo '<option value="'.$fila['nombre_producto'].'" selected>'.$fila['nombre_producto'].'</option>';
}
else
echo '<option value="'.$fila['nombre_producto'].'">'.$fila['nombre_producto'].'</option>';
}
pg_free_result($result4);
?>
</select><br /><br /><br /><br />
<input type="submit" class="btn_guardar" name="guardar" value="" title="Guardar Datos" />
</div>
</form>
<?php
include ('pie_pagina.php');
?>
</body>
</html>
Valora esta pregunta


0