File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55$ error = "" ;
66
77if (isset ($ _POST ['login ' ])) {
8-
9- // Sanitize input
108 $ gmail = mysqli_real_escape_string ($ conn , $ _POST ['gmail ' ]);
11- $ password = $ _POST ['password ' ]; // raw password
12-
13- // Fetch user from database
9+ $ password = $ _POST ['password ' ];
10+ \\
1411 $ sql = "SELECT * FROM userdata WHERE gmail=' $ gmail' " ;
1512 $ result = mysqli_query ($ conn , $ sql );
1613
1714 if (mysqli_num_rows ($ result ) > 0 ) {
1815 $ user = mysqli_fetch_assoc ($ result );
1916
20- // Verify password using password_verify()
2117 if (password_verify ($ password , $ user ['password ' ])) {
22- $ _SESSION ['gmail ' ] = $ user ['gmail ' ]; // store session
18+ $ _SESSION ['gmail ' ] = $ user ['gmail ' ];
2319 header ("Location: ../Saklaw/home.php " );
2420 exit ();
2521 } else {
3632 <meta charset="UTF-8">
3733 <meta name="viewport" content="width=device-width, initial-scale=1.0">
3834 <title>Login</title>
39-
40- <!-- Your CSS -->
4135 <link rel="stylesheet" href="../../../Saklaw/assets/css/auth.css">
42-
43- <!-- Bootstrap Icons -->
4436 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
4537
4638 <style>
You can’t perform that action at this time.
0 commit comments