Open spclanier opened 8 years ago
Im having trouble with the login page. I have check, rechecked and rechecked so
me more. When I enter my login info it takes me back to the login.php page.
here is my login.php code:
<?php
session_start();
include('../config/connection.php');
if($_POST) {
$q = "SELECT * FROM users WHERE email = '$_POST[email]' AND password = SHA1('$_POST[password]')";
$r = mysqli_query($dbc, $q);
if(mysqli_num_rows($r) == 1) {
$_SESSION['username'] = $_POST['email']; header('Location: index.php');
} }
?>
<!doctype html>
check this out. This problem was already been fixed.
Im having trouble with the login page. I have check, rechecked and rechecked so
me more. When I enter my login info it takes me back to the login.php page.
here is my login.php code:
<?php
Start Session
session_start();
Database connection
include('../config/connection.php');
if($_POST) {
$q = "SELECT * FROM users WHERE email = '$_POST[email]' AND password = SHA1('$_POST[password]')";
$r = mysqli_query($dbc, $q);
if(mysqli_num_rows($r) == 1) {
} }
?>
<!doctype html>
```login Admin Dashboard