From 94563eb6f48e1eae10e9a19c8e17a9414ef09b02 Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Wed, 21 Sep 2022 21:02:51 +0000 Subject: [PATCH] Removing random comments --- app/account/account.php | 32 +++++++++----------------------- index.php | 7 ------- 2 files changed, 9 insertions(+), 30 deletions(-) diff --git a/app/account/account.php b/app/account/account.php index 12534f9..62260cd 100644 --- a/app/account/account.php +++ b/app/account/account.php @@ -384,32 +384,17 @@ if (isset($_POST['submit_signup'])) { $param_token = $_POST['token']; if (mysqli_stmt_execute($stmt)) { - // - // Hey fluffy why didn't you do this - // Hey fluffy, thats not how you do this - // Thats wrong! Do this instead!!!!!! - // - // I DON'T KNOW HOW TO DO THIS, BUT IT WORKS - // SO LEAVE ME ALONEEEEEEEEEE - // anyway.... - // Generate Token $token_array = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz'; $new_token = substr(str_shuffle($token_array), 0, 15); - - // Prepare sql - $sql = "INSERT INTO tokens (code, used) VALUES(?, False)"; - $stmt = mysqli_prepare($conn, $sql); - mysqli_stmt_bind_param($stmt, "s", $param_new_token); - $param_new_token = $new_token; - mysqli_stmt_execute($stmt); + + mysqli_query($conn, "INSERT INTO tokens (code, used) VALUES('$new_toke', False)"); } // Yupeee! Account was made ?> - - + + - -