Skip to content

Commit

Permalink
Fixed not updating
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvius committed Mar 27, 2023
1 parent ae91404 commit 9529690
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion authenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
// SQL is written as a String.
// SQL is written as a String.
$userMail = ($_POST['email']);
echo($userMail);

$query = "SELECT * FROM users WHERE email = :email" ;

Expand Down
3 changes: 1 addition & 2 deletions create.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
require('connect.php');
//require('authenticate.php');
session_start();
echo($_SESSION['user_id']);
?>

<!DOCTYPE html>
Expand Down Expand Up @@ -103,7 +102,7 @@
<div id="all_blogs">
<form action="post.php" method="post">
<fieldset>
<legend>Edit Drip Post</legend>
<legend>Create Drip Post</legend>
<p>
<label for="title">Title</label>
<input name="title" id="title">
Expand Down
3 changes: 0 additions & 3 deletions post.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
$content = $_POST['content'];

$user_id = $_SESSION['user_id'];

echo($user_id);
//log($_SESSION['user_id']);

// Build the parameterized SQL query and bind to the above sanitized values.
$query = "INSERT INTO content_post (user_id, title, content) VALUES (:user_id, :title, :content)";
Expand Down
4 changes: 3 additions & 1 deletion register_post.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
) {
if (isset($_POST['register'])) {
if (
isset($_POST['username']) && !empty($_POST['username']) && isset($_POST['password']) && !empty($_POST['password']) && filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) && !empty(($_POST['email']))
isset($_POST['username']) && !empty($_POST['username']) && isset($_POST['password']) && !empty($_POST['password']) && isset($_POST['reenter_password']) && !empty($_POST['reenter_password']) &&
filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) && !empty(($_POST['email']) && $_POST['password'] == $_POST['reenter_password'])
) {

// Sanitize user input to escape HTML entities and filter out dangerous characters.
$client_name = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRIPPED);
$client_email = $_POST['email'];
Expand Down
3 changes: 3 additions & 0 deletions registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@
<label for="password">Password:</label>
<input type="password" id="password" name="password"><br><br>

<label for="reenter_password">Reenter Password:</label>
<input type="password" id="reenter_password" name="reenter_password"><br><br>

<label for="remember">Remember me</label>
<input type="checkbox" name="remember" value="Remember me ">

Expand Down

0 comments on commit 9529690

Please sign in to comment.