-1
ERROR: Parse error: syntax error, Unexpected '$email' (T_VARIABLE) in C: xampp htdocs SUPPORT password.php on line 6
CODE:
<?php
session_start();
include("config/config.php")
$email = $mysqli ->escape_string($_POST['email']);
if(filter_var($email, FILTER_VALIDATE_EMAIL)){
$erro[] = "E-mail inválido.";
}
$sql_code = "SELECT senha, codigo FROM usuario WHERE email = '$_SESSION[email]'";
$sql_query = $mysqli->query($sql_code) or die ($mysqli->error);
$dado = $sql_query->fetch_assoc();
$total = $sql_query->num_rows;
if($total == 0)
$erro[] = "O e-mail informado é inválido.";
if(count($erro) ==0 && $total > 0) {
if(isset($_POST[ok])){
$novasenha = substr(md5(time()), 0, 6);
$nscriptografada = md5(md5($novasenha));
}
if(mail($email, "Sua nova senha", "Sua nova senha: " .$novasenha)){
$sql_code = "UPDATE usuario SET senha = '$nscriptografada' WHERE email = '$email' ";
$sql_query = $mysqli->query($sql_code) or die($mysqli->error);
}
}
}
?>
Syntax error, missing
;
no include– Bacco