Foros del Web » Programando para Internet » PHP »

problema consulta

Estas en el tema de problema consulta en el foro de PHP en Foros del Web. compañeros estoy con un problema tengo un formulario que me debe hacer varias consultas pero solo me hace una y las otras salen en blanco ...
  #1 (permalink)  
Antiguo 27/04/2006, 08:17
Avatar de dontripi  
Fecha de Ingreso: enero-2006
Mensajes: 240
Antigüedad: 18 años, 3 meses
Puntos: 1
problema consulta

compañeros estoy con un problema tengo un formulario que me debe hacer varias consultas pero solo me hace una y las otras salen en blanco este es el codigo:


function cotiza()
{
global $menu, $bd, $sop, $HTTP_POST_VARS, $HTTP_GET_VARS;

$sop=$HTTP_GET_VARS["sop"];
switch($sop)
{
default:

$txtfech=$HTTP_POST_VARS["txtfech"];
$_SESSION["txtfech"] = $txtfech;

$_SESSION["slnit"] = $HTTP_POST_VARS["slnit"];
$_SESSION["slcencost"] = $HTTP_POST_VARS["slcencost"];
$_SESSION["slvendedor"] = $HTTP_POST_VARS["slvendedor"];
$_SESSION["txtconsnum"] = $HTTP_POST_VARS["txtconsnum"];
$_SESSION["txtdir1"] = $HTTP_POST_VARS["txtdir1"];
$_SESSION["txtdir2"] = $HTTP_POST_VARS["txtdir2"];
$_SESSION["txtciudad"] = $HTTP_POST_VARS["txtciudad"];
$_SESSION["txttel"] = $HTTP_POST_VARS["txttel"];
$_SESSION["txtemail"] = $HTTP_POST_VARS["txtemail"];
$_SESSION["txtcupo"] = $HTTP_POST_VARS["txtcupo"];
$_SESSION["txtdeuda"] = $HTTP_POST_VARS["txtdeuda"];
$_SESSION["txtmora"] = $HTTP_POST_VARS["txtmora"];
$_SESSION["txtultpag"] = $HTTP_POST_VARS["txtultpag"];
$_SESSION["slprod"] = $HTTP_POST_VARS["slprod"];
$_SESSION["txtdescprod"] = $HTTP_POST_VARS["txtdescprod"];


echo "<center>";
echo "<h3> COTIZACIONES DE SUMINISTRO PRODUCTOS Y SERVICIOS </h3>";
echo "</center>";
?>


<form method="post" name="frmcotiza" action="modulos.php?name=prueba&op=cotiza">

<body>

<center>
<table width="100%">
<tr>

<td>

<strong>Fecha:</strong>
</td>

<td colspan="2">

<input type="text" name="txtfecha" maxlength="6" size="6" value="<?php echo $_SESSION["txtfecha"]?>">
</td>


<td>
<strong>Nit Cliente:</strong>
</td>
<td colspan="2">

<select name="slnit" style="width:75">
<?php
$sql="SELECT nt_nit, nt_nombre FROM nits";
$bd->consulta($sql);
while ($datos=@pg_fetch_row($bd->Consulta_ID))
{
echo "<option value=\"$datos[0]\"";
if ($_SESSION["slnit"]==$datos[0])
echo " selected ";
echo ">$datos[1]</option>";
}
?>

</select>
</td>
<td>
<strong>Centro Costo:</strong>
</td>
<td >
<select name="slcencost" style="width:75">
<?php
$sql="SELECT sct_cuenta, sct_cencos FROM cgsct";
$bd->consulta($sql);
while ($datos=@pg_fetch_row($bd->Consulta_ID))
{
echo "<option value=\"$datos[0]\"";
if ($_SESSION["slcencost"]==$datos[0])
echo " selected ";
echo ">$datos[1]</option>";
}
?>

</select>

</td>

<td>
<strong>Vendedor:</strong>
</td>

<td>
<select name="slvendedor" style="width:75">



</select>
</td>

<td>
<strong>Dirección 1:</strong>
</td>

<td>
<input type="text" name="txtconsnum" maxlength="6" size="6" value="<?php echo $_SESSION["txtconsnum"]?>">
</td>

<tr>

<td>
<strong>Dirección 2:</strong>
</td>

<td>
<input type="text" name="txtdir1" maxlength="100" size="150" value="<?php echo $_SESSION["txtdir1"]?>">
</td>

</tr>

<tr>

<td>
<strong>Ciudad:</strong>
</td>

<td>

<input type="text" name="txtciudad" maxlength="20" size="20" value="<?php echo $_SESSION["txtciudad"]?>">

</td>

<td>
<strong>Telefono:</strong>
</td>

<td>
<input type="text" name="txttel" maxlength="20" size="20" value="<?php echo $_SESSION["txttel"]?>">
</td>


<td>
<strong>Email:</strong>
</td>

<td>
<input type="text" name="txtemail" maxlength="20" size="20" value="<?php echo $_SESSION["txtemail"]?>">
</td>
</tr>


<tr>
<td>
<strong>Cupo:</strong>
</td>
<td>
<input type="text" name="txtcupo" maxlength="100" size="150" value="<?php echo $_SESSION["txtcupo"]?>">
</td>

<td>
<strong>Deuda:</strong>
</td>
<td>
<input type="text" name="txtdeuda" maxlength="20" size="20" value="<?php echo $_SESSION["txtdeuda"]?>">
</td>
<td>
<strong>Mora:</strong>
</td>
<td>
<input type="text" name="txtmora" maxlength="20" size="20" value="<?php echo $_SESSION["txtmora"]?>">
</td>
<td>
<strong>Ult. Pago:</strong>
</td>
<td>
<input type="text" name="txtultpag" maxlength="20" size="20" value="<?php echo $_SESSION["txtultpag"]?>">
</td>
</tr>



<tr>

<td>
<strong>Producto:</strong>
</td>
</tr>


<tr>

<td>
<select name="slprod" style="width:75">



</select>
</td>

</tr>

</table>

</form>



<?php



break;
}
}


switch ($op)
{
case "cotiza": cotiza();
break;

}

?>


gracias por la ayuda.
  #2 (permalink)  
Antiguo 27/04/2006, 08:36
Avatar de dontripi  
Fecha de Ingreso: enero-2006
Mensajes: 240
Antigüedad: 18 años, 3 meses
Puntos: 1
listo ya la organizé que pena muchachos de todas maneras gracias
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 15:37.