Hi
I made a page which check the login information if it is true or not but the code didn't work there is no errors just empty page !
<?php
session_start();
?>
<html>
<head>
<meta http-equiv="content" content="text/html" charset="UTF-8" />
<title>Login checking</title>
</head>
<body>
<?php
require_once('inc/config.php');
$username = $_POST['username'];
$password = $_POST['password'];
$md5 = md5($password);
if(empty($username) or empty($password)) {
echo "Fill all fields";
}else{
$sql = "SELECT * FROM users WHERE username='".$username."'";
$query = mysql_query($sql) or die(mysql_error());
$result = mysql_fetch_assoc($query);
$result['username'];
$result['password'];
if($username == $result['username'] and $md5 == $result['password']) {
$SESSION['user'] = $username;
echo "Welcome".$username;
header("Refresh: 5;index.php");
}else {
echo "the username or the password is wrong";
}
?>
</body>
</html>