I am working on a project and i want to make a local webpage. It is in PHP made this site. But i have some problems. After you entered you email and password in the login section, the code has to redirect to the main page of the site but it doesn't do that. I mention that each page of the site is organized in a folder. For example, these are some of the folders: Main, Login, Register, etc. I put the code down below to see what is the problem with the redirect function.
Mineral-World/Main/Main.php
<html>
<link rel="stylesheet" href="designMain.css">
<head>
<link rel="icon" href="/Mineral-World/Main/More/icon.png" >
<title>Mineral-World</title>
</head>
<body>
<div class="topnav">
<a href="/Mineral-World/Main/Main.php">Home</a>
<a href="/Mineral-World/Buy/Buy.php">Buy</a>
<a href="/Mineral-World/Sell/Sell.php">Sell</a>
<a href="/Mineral-World/Information/Information.php">Information about minerals</a>
<a style="margin-left:750px;" href="/Mineral-World/Register/Register.php">Register</a>
<a href="/Mineral-World/Login/Login.php">Login</a>
</div>
<div class="stylename"> Welcome </div>
<div class="stylename3" >
<div class="card1" style="margin-left: 20px;float:left;">
<div class="stylename1" style="margin-left: 50px;"> What is Mineral-World?</div>
<div class="stylename2" style="margin-left:15px;"> We are an online market and here you can buy or sell minerals. You will find the best offers!</div>
</div>
<div class="card1" style="float:right;">
<div class="stylename1" style="margin-left: 50px;"> Are any taxes to be paid?</div>
<div class="stylename2" style="margin-left:15px;"> You can sell or buy minerals without any cost, including the registering process.</div>
</div>
</div>
</body>
</html>
Mineral-World/Login/sessionLogin.php
<?php
include("ConnectBD_Login.php");
session_start();
if(isset($_POST['email'])&&isset($_POST['password']))
{
$email=$_POST['email'];
$pass=md5($_POST['password']);
$sel="select user from users where email='$email' and pass='$pass'";
$que=mysql_query($sel);
if(mysql_num_rows($que)==1)
{
$rez=mysql_fetch_row($que);
$_SESSION['user']=$rez[0];
header("Location: D:\EasyPHP-5.3.8.1\www\Mineral-World\Main\Main.php");
exit();
}
else{
$_SESSION['neconect']="Email or password is incorrect!";
header();
exit();
}
}else {
$_SESSION['neconect']="Email or password is incorrect!";
header();
exit();
}
mysql_close();
?>