Ver Mensaje Individual
  #2 (permalink)  
Antiguo 10/03/2013, 19:57
miguelbc7
 
Fecha de Ingreso: mayo-2012
Mensajes: 15
Antigüedad: 12 años
Puntos: 0
Respuesta: problemas con formulario de registro

disculpen las molestias ya lo resolvi era algo sencillo, la respuesta es,

Cita:
<?php
include("../cgi/conectar.php");
$txtcedula = $_POST['txtcedula'];
$sql = "select cedula, nombre from listanegra";
$consulta = mysql_query($sql);
$b = mysql_fetch_array($consulta);
$sql2 = "select num_cedulapostulado,txt_nombrespostulado, txt_apellidospostulado from postulados";
$consulta2 = mysql_query($sql2);
$c = mysql_fetch_array($consulta2);

if ($b[0] == $txtcedula)
{
echo '<script type="text/javascript"> alert ("Usted no puede registrarse Sr. '.$b[1].'") </script>';
echo '<script type="text/javascript">window.location="../index.php"</script>';
exit();
}
else if ($c[0] == $txtcedula){
echo '<script type="text/javascript"> alert ("Usted ya esta registrado Sr. '.$c[1].' '.$c[2].'") </script>';
echo '<script type="text/javascript">window.location="../index.php"</script>';
exit();
}
else
{
echo '<script type="text/javascript">window.location="registro.php"</script>';
}
?>