Skip to content

Commit

Permalink
update signup in all files
Browse files Browse the repository at this point in the history
  • Loading branch information
Moslihbadr committed Jun 10, 2023
1 parent 25b5b59 commit 7a8b427
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 86 deletions.
2 changes: 1 addition & 1 deletion ToDo
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
1 - clear the coockie when the user logout.################################################### // DONE!
2 - hide the delete feature from everyone except the blog owner and 'admin' users.############ //
2 - hide the delete blog feature from everyone except the blog owner and 'admin' users.####### //
3 - hide the login/singup pages if the user is logged in.##################################### //
4 changes: 2 additions & 2 deletions login.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
$_SESSION["login"] = true;
setcookie('login_user_id', $user_id, time() + 86400, '/website/Blog', 'localhost'); // valid for one day

header('Location: new_blog.php?id=' . $_COOKIE["login_user_id"]);
header('Location: new_blog.php?id=' . $user_id);
exit();
} else {
$errorMessage = "Invalid Password, Try again.";
Expand Down Expand Up @@ -72,7 +72,7 @@
<label for="password" class="form-label">Password</label>
</div>
<div class="mb-3 ms-2">
<div id="emailHelp" class="form-text">Don't have an account? <a href="./sign_up.php">Sign up</a></div>
<div id="emailHelp" class="form-text">Don't have an account? <a href="./signup.php">Sign up</a></div>
</div>
<button type="submit" name="login" class="btn btn-success">Login</button>
</form>
Expand Down
2 changes: 1 addition & 1 deletion php/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<a class="nav-link px-2 text-secondary" href="../Blog/login.php">Login</a>
</li>
<li class="nav-item">
<a class="nav-link px-2 text-secondary" href="../Blog/sign_up.php">Sign up</a>
<a class="nav-link px-2 text-secondary" href="../Blog/signup.php">Sign up</a>
</li>
<?php }; ?>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion php/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<a class="nav-link" href="../Blog/login.php">Login</a>
</li>
<li class="nav-item">
<a class="nav-link" href="../Blog/sign_up.php">Sign up</a>
<a class="nav-link" href="../Blog/signup.php">Sign up</a>
</li>
<?php }; ?>
</ul>
Expand Down
81 changes: 0 additions & 81 deletions sign_up.php

This file was deleted.

0 comments on commit 7a8b427

Please sign in to comment.