Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/01/2008, 18:04
nmardones
 
Fecha de Ingreso: enero-2008
Ubicación: Valdivia
Mensajes: 4
Antigüedad: 16 años, 4 meses
Puntos: 0
Información Tengo Problemas con Insert

Estoy en un proreyecto en el cual no podido avanzar, tengo problemas para ingresar datos a la base de datos MySql.
Aqui va el codigo, si alguien me puede ayudar.
<form action="example1.html" method="post" name="example1" target="_parent">
<?php
include("conecta.php");
$link=Conectarse();
echo "Grabando........";
if (isset($_POST['grabar'])) {
$Sql="insert into llamados_comandancia (cod_tipo_llamado,cod_cuartel,cod_compania,fecha_r ecepcion,fecha_salida_carros,fecha_llegada_carros, direccion,seisdos,preinforme,detalle)
values ('".$_POST['tx_cod_tipo_llamado']."','".$_POST['tx_cod_cuartel']."',
'".$_POST['tx_cod_compania']."','".$_POST['tx_fecha_recepcion']."','".$_POST['tx_fecha_salida_carros']."',
'".$_POST['tx_fecha_llegada_carros']."','".$_POST['tx_direccion']."','".$_POST['tx_direccion']."',
'".$_POST['tx_seisdos']."','".$_POST['tx_preinforme']."','".$_POST['tx_detalle']."')";
$result=mysql_query($Sql,$link);
echo $Sql;
echo "Grabando........";
}
?>
<hr>
<table>
<tr>
<td><img src="http://www.forosdelweb.com/images/logo_01.jpg" height="48" width="48" ></td>
<td><center><h1>Ingreso Datos (Llamados Comandancia)</h1></center></td>
</tr>
</table>
<hr>
<hr>

<h1>Central Alarmas</h1>
<h2>Ingreso de Datos al Sistema</h2>
<table border="0">
<tr>
<td>
<table width="900">
<tr>
<td width="200" height="20" class="mandatory">Codigo de Llamado</td>
<td><input type="text" name="tx_cod_tipo_llamado" id="tx_cod_tipo_llamado" maxlength="30" size="40"
value="<?php echo $cod_tipo_llamado; ?>"></td>
<td width="400" height="20" class="comment">//--- Seleccionar tipo de Llamado</td>
</tr>
<tr>
<td class="mandatory" height="20">Codigo de Cuartel</td>
<td><input type="text" name="tx_cod_cuartel" id="tx_cod_cuartel" maxlength="30" size="40"
value="<?php echo $cod_cuartel; ?>"></td>
<td class="comment" height="20">//--- Seleccionar Tipo Cuartel</td>
</tr>
<tr>
<td class="mandatory" height="20">Codigo de Compa&ntilde;ia</td>
<td><input type="text" name="tx_cod_compania" id="tx_cod_compania" maxlength="30" size="40"
value="<?php echo $cod_compania; ?>"></td>
<td class="comment" height="20">//--- Seleccionar la Compa&ntilde;ia</td>
</tr>
<tr>
<td class="mandatory" height="20">Fecha de Recepci&oacute;n</td>
<td><input type="text" name="tx_fecha_recepcion" id="tx_fecha_recepcion" maxlength="30" size="40"
value="<?php echo $fecha_recepcion; ?>"></td>
<td class="comment" height="20">//--- Fecha de recepcion del Llamado por la Central On LIne</td>
</tr>
<tr>
<td class="mandatory" height="20">Fecha Salida</td>
<td><input type="text" name="tx_fecha_salida_carros" id="tx_fecha_salida_carros" maxlength="30" size="40"
value="<?php echo $fecha_salida_carros; ?>"></td>
<td class="comment" height="20">//--- Fecha Salida de Carros</td>
</tr>
<tr>
<td class="mandatory" height="20">Fecha Llegada</td>
<td><input type="text" name="tx_fecha_llegada_carros" id="tx_fecha_llegada_carros" maxlength="30" size="40"
value="<?php echo $fecha_llegada_carros;?>"></td>
<td class="comment" height="20">//--- Fecha llegada de Carros</td>
</tr>
<tr>
<td class="mandatory" height="20">Direcci&oacute;n</td>
<td><input type="text" name="tx_direccion" id="tx_direccion" maxlength="30" size="40"
value="<?php echo $direccion;?>"></td>
<td class="comment" height="20">//--- Direcci&oacute;n del Llamado</td>
</tr>
<tr>
<td class="mandatory" height="20">6-2</td>
<td><input type="text" name="tx_seisdos" id="tx_seisdos" maxlength="30" size="40"
value="<?php echo $seisdos;?>"></td>
<td class="comment" height="20">//--- Primer Informe del Llamado ( Lo que divisa El Oficial a cargo)</td>
</tr>
<tr>
<td class="mandatory" height="20">Preinforme</td>
<td><input type="text" name="tx_preinforme" id="tx_preinforme" maxlength="30" size="40"
value="<?php echo $preinforme; ?>"></td>
<td class="comment" height="20">//--- Primer Informe</td>
</tr>
<tr>
<td class="mandatory" height="20">Detalle</td>
<td><input type="text" name="tx_detalle" id="tx_detalle" maxlength="30" size="40"
value="<?php echo $detalle; ?>"></td>
<td class="comment" height="20">//--- Detalle </td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" value="Grabar" id="grabar"></td>
</tr>
</table>

</td>
</tr>
</table>

<input name="grabar" type="submit" value="Grabar" id="grabar">
</form>

Última edición por nmardones; 09/01/2008 a las 18:07 Razón: Para que entienda mejor el codigo