<?php
session_start();
include 'mysql.php';
$email = $_POST['email'];
$password = trim( htmlentities( strip_tags( $_POST['password'] ) ) );
$sql = "
SELECT *
FROM users
WHERE email='$email'
AND password='$password'
";
print $sql;
$result = mysqli_query($sql);
$row = mysqli_num_rows($result);
print $row;
if ( $row == 1) { //ehhez kell egy unique index a táblába, az email és password mezõkre.
$_SESSION['email'] = $_POST['email'];
echo $_SESSION['email'];
echo "hello";
} else {
echo "fuck you";
echo $_POST['email'];
}
?>