-1
I have an old form that would like to adjust a page with current PHP parameters. Follows code:
<?php include "login_senha.php";
$email = $_POST['email'];
$sql = mysql_query("SELECT * FROM usuarios WHERE email = '$email'");
while($linha = mysql_fetch_array($sql)) {
$email_db = $linha['email'];
}
$cont = mysql_num_rows($sql);
if($cont == 0){
echo"
<meta http-equiv='refresh' content='0; url=cadastro02.php' />
<script type='text/javascript'>alert('Login nao existe')</script>
";
} else {
if($senha_db !=$senha){
echo"
<meta http-equiv='refresh' content='0; url=cadastro02.php' />
<script type='text/javascript'>alert('Senha nao corresponde')</script>
";
} else {
session_start();
$_SESSION['email_usuario'] = $email;
header("Location: segunda.php");
}
}
$sql = mysql_query("SELECT * FROM dropdown");
while($record = mysql_fetch_array($sql)) {
echo '<option value="' . $record['item'] , '">' . $record['item'] .'"</option>';
}
mysql_close($db);
?>
If I’m not mistaken today is no more mysql and yes mysqli, correct?
Hi friend, it worked, listed all the emails from my database, but it turns out that it does not log in, says that user does not exist, and is there in the listing that it shows. But thank you very much for your attention.
– Alessandro Ramos