Pues ciertamente tienes toda la razón, puse el código erróneo, echar la culpa a mi falta de sueño este código es el de vieja paginación de mi pagina no el del sistema de registro.
Hoy después de haber despertado me di cuenta del error astronómico que he cometido XD
Este es el código y es parte del sistema de registro que estoy diseñando.
<?php
if(isset($HTTP_COOKIE_VARS["usuario"]) && isset($HTTP_COOKIE_VARS["contrasena"]))
{
header('Location: http://www.mangasve.com.ve/');
}
require_once('recaptchalib.php');
$captcha_publickey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$captcha_privatekey ="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$error_captcha=null;
if ($_POST['post']) {
$pass = md5($_POST[pass]);
$passc = md5($_POST[passc]);
$captcha_respuesta = recaptcha_check_answer ($captcha_privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if ($captcha_respuesta->is_valid) {
include('conexion.php');
$link=Conectarse();
$nik_correcto = '0';
$mail_correcto = '0';
if ((strlen($_POST[correo]) >= 6) && (substr_count($_POST[correo],"@") == 1) && (substr($_POST[correo],0,1) != "@") && (substr($_POST[correo],strlen($_POST[correo])-1,1) != "@")){
if ((!strstr($_POST[correo],"'")) && (!strstr($_POST[correo],"\"")) && (!strstr($_POST[correo],"\\")) && (!strstr($_POST[correo],"\$")) && (!strstr($_POST[correo]," "))) {
if (substr_count($_POST[correo],".")>= 1){
$term_dom = substr(strrchr ($_POST[correo], '.'),1);
if (strlen($term_dom)>1 && strlen($term_dom)<5 && (!strstr($term_dom,"@")) ){
$antes_dom = substr($_POST[correo],0,strlen($_POST[correo]) - strlen($term_dom) - 1);
$caracter_ult = substr($antes_dom,strlen($antes_dom)-1,1);
if ($caracter_ult != "@" && $caracter_ult != "."){
$mail_correcto = '1';
}
}
}
}
}
if ((strlen($_POST[nick]) >= 4) && (strlen($_POST[nick]) <= 20))
{
if ((!strstr($_POST[nick],"'")) && (!strstr($_POST[nick],"\"")) && (!strstr($_POST[nick],"\\")) && (!strstr($_POST[nick],"$")) && (!strstr($_POST[nick],"{ ")))
{
$nik_correcto = '1';
}
}
if($pass != $passc)
{
$passe = '<span style="color:red">La contraseña no es igual.</span>';
}
else if($_POST[correo] != $_POST[correoc])
{
$correoce ='<span style="color:red">el correo no es igual.</span>';
}
else if(($_POST[nick] == '') or ($_POST[pass] == '') or ($_POST[correo] == '') )
{
$campof = '<b><span style="color:red">Por favor rellene todos los campos.</span></b>';
}
else if ($mail_correcto == 0)
{
$correoe = '<span style="color:red">El correo no es valido.</span>';
}
else if ($nik_correcto == 0)
{
$campof = '<span style="color:red">El usuario no es valido, Solo caracteres de la A a la Z y del 1 al 0</span>';
}
else
{
$cuantosnicks=mysql_query("SELECT nick FROM usuarios WHERE nick='".$_POST["nick"]."' ");
$cuantosemails=mysql_query("SELECT email FROM usuarios WHERE email='".$_POST["correo"]."' ");
$nickrepetido = mysql_num_rows($cuantosnicks);
$emailrepetido = mysql_num_rows($cuantosemails);
if($nickrepetido >= 1)
{
$campof = '<b><span style="color:red">El nombre de usuario ya esta en uso.</span></b>';
}
else if($emailrepetido >= 1)
{
$correoe = '<span style="color:red">El correo lla esta en usó.</span>';
}
else
{
$class = '4';
$comen = '0';
$dias = array('?','Ene','Feb','Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic');
$mes = $dias[date('n')];
$ano = date('Y');
$dia = date('d');
$activo = '3';
$fecha = $dia.' '.$mes.','.$ano;
$img = 'http://www.mangasve.com.ve/avatares/sin-avatar.png';
$registrar = mysql_query("INSERT INTO usuarios values ('','$_POST[nick]','$pass','$fecha','$class','$_POST[correo]','$comen','$img','$activo') ",$link) or die (mysql_error());
setcookie("usuario",$_POST[nick],time()+7776000);
setcookie("contrasena",$pass,time()+7776000);
setcookie("class",$class,time()+7776000);
header('Location: http://www.mangasve.com.ve/');
}
mysql_free_result($cuantosnicks); //liberamos memoria
mysql_free_result($cuantosemails); //liberamos memoria
}
}
else{
$error_captcha = $captcha_respuesta->error;
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5 Transitional//ES">
<html>
<head>
<META content="es" http-equiv="Content-Language">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
<link rel="stylesheet" href="estilo2.css" type="text/css" media="all">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<meta name="Keywords" content="">
<meta name="Description" content="| mangasve es el lugar venezolano para opinar, leer y disfrutar de los mangas on-line">
<title>Registrate | mangasve el lugar venezolano del manga</title>
<? include ("cabecera.php") ?>
<div id="contenidos">
<div id="menu1">
<? include ("menu.php") ?>
</div> <!--menu1-->
<div id="contenido">
<div id="contenido-tema"><!--maho-shojo-->
<div id="cabecera-mahoshojo">
</div>
<div class="post-head">
</div>
<div id="tema">
<h1>Registrar Usuario</h1>
<div id="registro">
<?php echo $campof ?>
<form action ="registrar.php" method="POST">
<div id="registrot"><b>Usuario <br /><?php echo $passe ?> <br />Contraseña<br />Repetir contraseña<br /><?php echo $correoe ?><br />Correo<br /> Repetir correo<br /><?php echo $correoce ?></b></div>
<div style="float:right"><input type = "text" size="18" name = "nick"><br /><br /><input type = "password" size="18" name = "pass"><br /><input type = "password" size="18" name = "passc"><br /><br /><input type = "text" size="18" name = "correo"><br /><input type = "text" size="18" name = "correoc"></div>
<div id="capcha">
<?
echo recaptcha_get_html($captcha_publickey, $error_captcha);
?></div>
<input type = "submit" name="post" value="Ingresar" class="button2">
</form>
</div>
</div>
<div class="post-feed">
</div>
</div>
</div><!--contenido-->
</div> <!-- contenidos -->
<? include ("pie.php") ?>
</body>
</html>