 
			
				01/08/2012, 01:35
			
			
			     |  
      |    |    |    Fecha de Ingreso: noviembre-2004  Ubicación: Medellín  
						Mensajes: 121
					  Antigüedad: 21 años Puntos: 1     |        |  
  |      Respuesta: Sintaxis        <body> 
<?php 
error_reporting(E_ALL); 
ini_set('display_errors', 1);     
function ingresar(){ 
$link = mysql_connect('localhost',  'yonerflash', 'f740166'); 
if  (!$link) { 
    die('No pudo conectarse: ' . mysql_error()); 
} 
$database="admision"; 
mysql_select_db($database) or die( "Unable to select database");   
echo "Conectado"; 
$cedula=$_POST['texCedula']; 
$nombres=$_POST['texNombres']; 
$apellidos=$_POST['texApellidos']; 
$correo=$_POST['texCorreo']; 
echo "insert into candidatos (cedula,nombres,apellidos correo) values ('$cedula','$nombres','$apellidos','$correo')"; 
mysql_query("insert into candidatos (cedula,nombres,apellidos,correo) values ('$cedula','$nombres','$apellidos','$correo')", $link); 
echo("Datos guardados"); 
mysql_close($link); 
}   
?>   
<form action="../pruebas/pagina_dos.php" method="post" name="form1"> 
  <p> 
    <label> 
      Cedula<br /> 
      <input type="text" name="texCedula" id="texCedula" /> 
    </label>   
  </p> 
  <p> 
    <label> 
      Nombres<br /> 
      <input type="text" name="texNombres" id="texNombres" /> 
      <span id="mensaje_nombres"></span> 
    </label> 
  </p> 
  <p> 
    <label> 
      Apellidos<br /> 
<input type="text" name="texApellidos" id="texApellidos"value="" /> 
<span id="mensaje_apellidos"></span> 
    </label> 
  </p> 
  <p>Correo<br />   
  <label> 
    <input type="text" name="texCorreo" id="texCorreo" /> 
  </label> 
  </p> 
  <p> 
    <label> 
      <input type="button" name="butGuardar" id="butGuardar" value="Guardar" onclick="ingresar();"/>   
    </label> 
    <label> 
      <input type="button" name="butCancelar" id="butCancelar" value="Cancelar"  /> 
    </label> 
  </p> 
</form>   
</body>           |