I'm trying to do a login page. This file (login.php) is inside a folder, the other pages where this one should redirect are in the parent folder. If i open directly the file login.php the redirection works. On the website the redirection page is opened but the path is still http://mywebsite.com/login.php and i can't move anymore from there.
<?php
include("dbconnection");
$email = mysql_real_escape_string($_POST['email']);
$password = mysql_real_escape_string($_POST['password']);
$ris_news= mysql_query("SELECT * FROM user,contact_info WHERE contact_info.data = '$email' AND user.password = '$password'");
if (mysql_num_rows($ris_news) == 1) {
// Set username session variable
$_SESSION['email'] = $email;
// Jump to secured page
header('Location: ../logsucc.html');
}
else {
// Jump to login page
header('Location: ../logwr.html');
}
mysqli_close($db);
?>