 
			
				08/10/2005, 10:02
			
			
			     |  
      |    |    |    Fecha de Ingreso: marzo-2004  
						Mensajes: 271
					  Antigüedad: 21 años, 8 meses Puntos: 0     |        |  
  |      estudia esto y creo que podras sacar algo en claro. 
<?php 
if ($submit): 
    	$cnx = conectar ();   
	$campos = "orden,fechae,pagon,urgente,rurgencia,desplazamien  to,gestion,siniestro,id,otroscobro"; 
    $valores .= "'".$_POST['orden']."',"; 
    $valores .= "'".$_POST['res']."',"; 
	$valores .= "'".$_POST['pagon']."',"; 
    $valores .= "'".$_POST['urgente']."',"; 
    $valores .= "'".$_POST['rurgencia']."',"; 
    $valores .= "'".$_POST['desplazamiento']."',"; 
	$valores .= "'".$_POST['gestion']."',"; 
    $valores .= "'".$_POST['siniestro']."',"; 
    $valores .= "'".$_POST['id']."',"; 
	$valores .= "'".$_POST['otroscobro']."'";         
     if   ($orden==""){ 
  echo  ("<p>Debes de introducir el numero del parte</p>"); 
   } 
 else 
  	$sql = "INSERT INTO pmultiasistencia ($campos) VALUES($valores)"; 
	$res = mysql_query($sql) or die(mysql_error()); 
    echo("<p>Alta dada satisfactoriamente</p>");   
   mysql_close($cnx); 
	exit;     
?> 
 <?php 
  else: 
?>  <body onload=" llenaAno(document.frm.ano)"> 
<table border="3" width=100% bordercolor="#0000FF"bgcolor="#C0C0C0"> 
<form name="frm"  method="post" action="<?echo $_SERVER['PHP_SELF'];?>"> 
<tr > <td> 
<b>Orden:</b> <input type="text" name="orden" size="10" maxlength="255" />   
        <b>Fecha de Envio: </b> 
       Año: 
       <select name="ano" onchange="cambia(0)" style="width: 80"> 
      </select> 
      Mes: 
      <select name="mes" onchange="cambia(1)" style="width: 80"> 
      </select> 
      Día: 
      <select name="dia" onchange="cambia(2)" style="width: 80"> 
      </select> 
      <input type="text" name="res" id="fechae" disabled> 
     </td> 
    </tr> 
<tr>   <td> 
<b>Cantidad a Cobrar: </b><input type="text" name="pagon" size="6" maxlength="6" />     
<b>Urgente:</b><select name="urgente"> 
    <option value="NO">No</option> 
    <option value="SI">Si</option></select>   
  </td>  </tr> 
<tr>   <td> 
<b>Recargo por Urgencia:</b> <input type="text" name="rurgencia" size="2" maxlength="2" />   
<b>Cobro por desplazamiento:</b> <input type="text" name="desplazamiento" size="6" maxlength="6" />   
<b>Gastos por Gestion:</b> <input type="text"  name="gestion" size="6" maxlength="6" /> 
  </td>  </tr> 
  <tr>   <td> 
<b>Siniestro:</b> <select name="siniestro"> 
    <option value="NO">No</option> 
    <option value="SI">Si</option></select>   
<b>Otros Cobros:</b> <input  type="text" name="otroscobro" size="6" maxlength="6" /> 
   </td>  </tr> 
   <tr>   <td> 
    <input type="submit" name="submit" value="ALTA" /> 
    </td>  </tr> 
</form> 
</table>   
<?php endif; ?>           |