Skip to content

Commit 71d93b3

Browse files
committed
update
1 parent c7c479d commit 71d93b3

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
include_once('footer.php');
44
include_once('db.php');
55

6-
$strSQL = "SELECT * FROM users WHERE username = '".$_SESSION['username']."'";
6+
/*$strSQL = "SELECT * FROM users WHERE username = '".$_SESSION['username']."'";*/
77
?>
88
<!DOCTYPE html>
99
<html lang="en" dir="ltr">
@@ -15,9 +15,9 @@
1515
</head>
1616
<body>
1717
<p>Welcome
18-
<strong>
18+
<!-- <strong>
1919
<?php echo $_SESSION [username]; ?>
20-
</strong>
20+
</strong> -->
2121
</p>
2222
</body>
2323
</html>

login.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838

3939
$req->closeCursor();
40-
header("Location: index.php");
40+
header("Location:index.php");
4141

4242
exit();
4343

signin.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
if ( !empty($_POST['password']) AND isset($_POST['confirmPassword'])){
2626
if ($_POST["password"]== $_POST["confirmPassword"]) {
2727
$password = trim($_POST['password']);
28-
$passhash = password_hash($password,PASSWORD_DEFAULT);
28+
$passhash = sha1($password);
2929
}
3030
}
3131
else
@@ -54,11 +54,9 @@
5454

5555
$req->execute();
5656
$req->closeCursor();
57-
header("Location: index.php");
57+
header("Location:profile.php");
5858
exit();
5959

60-
61-
6260
}
6361
else{
6462
print_r($mistakes);
@@ -79,7 +77,7 @@
7977
</head>
8078
<body>
8179

82-
<form method="post" class='login-form' action="signin.php">
80+
<form method="POST" class='login-form' action="signin.php">
8381

8482
<div class="flex-row">
8583
<label class="lf--label" for="username">

0 commit comments

Comments
 (0)