Qiero q pida id que es memb__id
y mail que es mail_addr
qiero hacer una consulta que sea asi
id
mail .. si los 2 son verdaderos regrese contraseña
pero no me sale ayuda ..
No borren mi post plis u.u
$login = stripslashes($_POST['account']);
$name = stripslashes($_POST['name']);
$code = stripslashes($_POST['code']);
$email = stripslashes(strip_tags($_POST['email']));
require 'config1.php';
$msconnect=mssql_connect("$dbhost","$dbuser","$dbp asswd");
$msdb=mssql_select_db("$db",$msconnect);
if ((eregi("[^a-zA-Z0-9\.@>=<!?*$¬/~+#^ç|_-]", $login))) { echo("<font face='georgia' color='white'><b>Cuenta(ID): Caracteres Invalidos</b></font><br />");exit();}
if ((eregi("[^a-zA-Z0-9\.@>=<!?*$¬/~+#^ç|_-]", $name))) { echo("<font face='georgia' color='white'><b>Nombre de usuario: Caracteres Invalidos</b></font><br />");exit();}
if ((eregi("[^0-9]", $code))) { echo("<font face='georgia' color='white'><b>Codigo Personal: Solo Numeros</b></font><br />");exit();}
$msconnect=mssql_connect("$dbhost","$dbuser","$dbp asswd");
$msdb=mssql_select_db("$db",$msconnect);
$sql_username_check = mssql_query("SELECT memb___id FROM MEMB_INFO WHERE memb___id='$login'");
$username_check = mssql_num_rows($sql_username_check);
$sql_mail_check = mssql_query("SELECT mail_addr FROM MEMB_INFO WHERE mail_addr='$mail'");
$mail_check = mssql_num_rows($sql_mail_check);
$sql_pw_check = mssql_query("SELECT memb__pwd, mail_addr FROM MEMB_INFO WHERE mail_addr='$mail' and memb___id='$login'");
$sql_pw_get = mssql_query("SELECT memb__pwd, mail_addr FROM MEMB_INFO WHERE memb___id='$login'");
$pw_check = mssql_num_rows($sql_pw_check);
$pw_retrieval = mssql_fetch_row( $sql_pw_get );
if (empty($login) | empty($mail)) {
echo "<font face='Courier New' color='white'>Algunos espacios fueron dejados en blanco.</font><br>";
}
elseif ($username_check <= 0){
echo "<font face='georgia' color='white'><b>Cuenta Ingresada no existe.</b></font><br>"; }
elseif ($mail_check <= 0){
echo "<font face='georgia' color='white'><b>Codigo Personal Ingresado es incorrecto.</b></font><br>"; }
else {
echo "<font face='georgia' color='Red'><b>Password Recuperado Exitosamente</b></font><br/><br/><font face='georgia' color='white'><b>Password:</b> $pw_retrieval[0]</font>"; }
?>