Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/02/2007, 20:47
Avatar de fenix_ikki
fenix_ikki
 
Fecha de Ingreso: mayo-2004
Mensajes: 25
Antigüedad: 20 años
Puntos: 0
Ayudenme con esto PLS

Tengo un mi pagina ing_actuacion.php donde tengo este codigo:

<form action="fin_ing_act.php" method="get" name="ingreso" id="ingreso">
<div align="left">
<input type=hidden name=listar value=0>

</div>
<table width="553" height="502" border="1" align="left" cellspacing="0">
<tr>
<td colspan="4"><table width="542" height="117" border="0" align="left">
<tr>
<td width="536" height="102"><img src="images/desp_gaudi.gif" width="536" height="107"></td>
</tr>
</table></td>
</tr>
<tr>
<td width="104"><font size="3"><strong>Telefono:</strong></font></td>
<td colspan="3"><font size="2">
<input name="telefono" type="text" id="telefono">
</font></td>
</tr>
<tr>
<td><div align="left"><strong><font size="3">Fecha</font><font size="4">:</font></strong></div></td>
<td width="199"> <input READONLY name="fec" type="text" value="<? echo date("20y")?>-<? echo date("m")?>-<? echo date("d")?>" size="10" maxlength="10" id="fec">
(yyyy/mm/dd) </td>
<tr>
<td><strong><font size="3">Hora</font><font size="4">:</font><font size="4"></font><font size="4"></font></strong></td>
<td> <input READONLY name="hora" type="text" value="<? echo date("H")?>:<? echo date("i")?>:<? echo date("s")?> <? echo date("a")?> " size="5" maxlength="5" id="hora">
(hh:mm:ss) </td>
</tr>
<tr>
<td><font size="3"><strong>Despachador:</strong></font></td>
<td><font size="2">
<input READONLY name="operador" type="text" value="<? echo $_SESSION['user']; ?>" id=operador">
</font></td>
<td width="81"><strong>Tecnico:</strong></td>
<td width="151"><div align="center"><font size="2">
<input name="tecnico" type="text" id="tecnico">
</font></div></td>
</tr>
<tr>
<td height="28"><font size="3"><strong>Casuistica:</strong></font></td>
<td colspan="3">
<select name="cmb_motivo" id="cmb_motivo">
<?
$qry100 = "select 0, 'Seleccionar...' UNION select cod_caso,nombre from casos";
$res100 = mysql_query($qry100);

while ($cantres100=mysql_fetch_array($res100))
{
$tmpxx = "<option value=" . $cantres100[0];
if($cmb_motivo == $cantres100[0]) $tmpxx = $tmpxx." selected";
$tmpxx = $tmpxx.">".$cantres100[1]."</option>";
echo $tmpxx;
}

?>
</select>
<?=$motivo_; ?>
</td>
</tr>
<tr>
<td height="186"><font size="3"><strong>Detalle</strong></font></td>
<td colspan="3"><font size="2">
<textarea name="detalle" rows="10" cols="45" id="detalle" dir="ltr"></textarea>
</font></td>
</tr>
<tr>
<td height="33" colspan="4"><div align="center"><font size="3"><a href="javascript:verifica(document.ingreso)"><img src="images/GRABA.jpg" border="0" width=110 height=25></a></font><font size="2">
</font><font size="3"><img src="images/btn_cancelar.gif" border="0" width=110 height=25></font><font size="2"> </font></div></td>
</tr>
</table>
</form>

Y tengo otro formulario donde ingreso los datos llamado fin_ing_act.php donde coloco esto:

<?php
$telefono=$_GET['telefono'];
$operador=$_GET['operador'];
$tecnico=$_GET['tecnico'];
$fecha=date($_GET['fec'],"yyyy-m-d");
$hora=$_GET['hora'];
$caso=$_GET['cmb_motivo'];
$detalle=$_GET['detalle'];

$link=Conectarse();
$sql = "INSERT INTO actuacion_tecnico (despachador,tecnico,telefono,fecha_act,hora,caso, detalle)";
$sql .= " VALUES ('$operador','$tecnico','$telefono','$fecha','$hor a','$caso','$detalle')";
$result = mysql_query($sql);
?>

Mi problema es la variable $caso esta pasando el codigo del caso mas no el nombre del caso ya q cmn_motivo esta capturando el codigo mas no el nombre, COMO PUEDO HACER PARA Q CAPTURE EL NOMBRE? Ya que en el primer formulario en ese combo de casuisticas me lista el nombre mas no el codigo pero al pasar los datos al otro formulario me pasa el codigo