so as the title says, I'm looking to include a Session Variable into a MySQL Update statement. I'm not exactly sure what I'm doing wrong, but I certainly know I am. I'm also fairly new to this, so that may explain it lol! I've looked around a lot for solutions, and I know the solution is very simple, but I just can't find it. Thanks in advance for your help.
Code in view.php:
$email = $conn->query("SELECT email FROM memberapplications WHERE ID = " . $_GET["appid"]);
$_SESSION["email"] = $email;
Code in redirect.php:
//There are also connections and stuff here, but didn't see a need to include it.
$sql = "UPDATE users SET appstatus='2' WHERE email='$email'";