From 952969039df458779d4294824f908af4a1054160 Mon Sep 17 00:00:00 2001 From: kelvius Date: Mon, 27 Mar 2023 02:37:10 -0500 Subject: [PATCH] Fixed not updating --- authenticate.php | 1 - create.php | 3 +-- post.php | 3 --- register_post.php | 4 +++- registration.php | 3 +++ 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/authenticate.php b/authenticate.php index c506b00..ca49ebf 100644 --- a/authenticate.php +++ b/authenticate.php @@ -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" ; diff --git a/create.php b/create.php index e02c4ec..ff9808f 100644 --- a/create.php +++ b/create.php @@ -10,7 +10,6 @@ require('connect.php'); //require('authenticate.php'); session_start(); -echo($_SESSION['user_id']); ?> @@ -103,7 +102,7 @@
- Edit Drip Post + Create Drip Post

diff --git a/post.php b/post.php index d25c651..eb5801a 100644 --- a/post.php +++ b/post.php @@ -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)"; diff --git a/register_post.php b/register_post.php index 97950c4..19eab27 100644 --- a/register_post.php +++ b/register_post.php @@ -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']; diff --git a/registration.php b/registration.php index 9cecf1a..347aa1f 100644 --- a/registration.php +++ b/registration.php @@ -75,6 +75,9 @@

+ +

+