I've been trying to find out what's giving me this error 500 on my server. i've been trying to add some prepared statements to my server for some password checking. But I do have an error on the bind_param line that makes all of it returning an error 500. I can't find out where's the mistake and why it's failing.
$password = $_GET['p'];
$query = $db->prepare("SELECT * FROM ItemPassTable WHERE Password = ?");
$query->bind_param("s", $password);
if($query->execute())
{
$res = $query->get_result();
if ($row = $res->fetch_assoc()) {
header("Location: moveTo.php?pointingto=$password");
die();
}
}