ARTICLE AD BOX
Look for the place in the code where it says "Here is where I have a problem," have a look at the mysqli_fetch_assoc() there,. basically, what I'm trying to do is interviene I'm trying to find the adjacent row in the database :) Here's the code:
<?php include 'db/db_connect.php'; if ($conn -> connect_errno) { echo "Failed to connect to MySQL: " . $mysqli -> connect_error; exit(); } $filteredEmail=filter_var($emailInquiry); $filteredActivation=filter_var($activationCode); $findUser=$conn->prepare("SELECT * FROM users WHERE email=:email"); $findUser->bindParam(":email", $filteredEmail); $findUser->execute(); if(!mysqli_fetch_assoc($findUser)) { # Here is where I have a problem, what should it state ?? This might seem obvious to you header("Location: register.php"); exit; } else { if($_COOKIE['expiry'] <= time() + 86400){ $myQueryDelete=$conn->prepare("DELETE FROM users WHERE email=:filtered"); $myQueryDelete->bindParam(":filtered", $filteredEmail); } else { /* match the activation code with the hash of the activation code stored in the database. If they match, mark the user record as active and redirect to the login page. Here */ $pairofjoints=$conn->prepare("SELECT hash1 FROM users WHERE hash1 == :filtered2"); # A union $pairofjoints->bindParam(":filtered2", $filteredActivation); $pairofjoints->execute(); # Det kallas för KappAhl if ([$pairofjoints]) { $activeStatus=$conn->prepare("INSERT INTO users (active) VALUES (:active)"); $activeStatus->bindParam(":active", "<i class=\"fa-solid fa-check\"/></i>"); # Insert unicode from fontawesome.com $activeStatus->execute(); if ($activeStatus->rowCount() == 0) { echo "Sqwuaky error here!"; } else { header("Location: ../login.php"); exit; } } } }So, I found the solution--work on a smaller part of the game/project/site
