asdf
This commit is contained in:
		@@ -7,7 +7,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
 | 
			
		||||
    $email = $_POST['email'];
 | 
			
		||||
    $password = $_POST['password'];
 | 
			
		||||
 | 
			
		||||
    // Prepare and execute the SQL query using prepared statements
 | 
			
		||||
    // Validate login credentials and fetch user details
 | 
			
		||||
    $query = "SELECT id, username, password, isAdmin FROM users WHERE email = ?";
 | 
			
		||||
    $stmt = $mysqli->prepare($query);
 | 
			
		||||
    $stmt->bind_param("s", $email);
 | 
			
		||||
@@ -17,7 +17,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
 | 
			
		||||
    // Fetch the result
 | 
			
		||||
    if ($stmt->fetch() && password_verify($password, $user_password)) {
 | 
			
		||||
        $_SESSION['user_id'] = $user_id;
 | 
			
		||||
        header('Location: index.php');
 | 
			
		||||
 | 
			
		||||
        // Redirect to the main domain after successful login
 | 
			
		||||
        header('Location: http://watch.twip-network.org');
 | 
			
		||||
        exit();
 | 
			
		||||
    } else {
 | 
			
		||||
        echo "Invalid email or password.";
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user