setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $stmt = $conn->prepare("SELECT * FROM admins WHERE email=:email"); $stmt->bindParam(':email', $_POST['email']); $stmt->execute(); $row = $stmt->fetch(); if (password_verify($_POST['password'], $row['password'])){ $_SESSION['admin'] = true; } else { $_SESSION['admin'] = false; } } catch (PDOException $e) { echo "

Error!: " . $e->getMessage() . "

"; } $stmt=null; $conn=null; } ?> Yota Callplan
YOTA
'; echo "\n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "\n"; foreach($conn->query("SELECT * FROM activities WHERE approved = false") as $row) { echo ""; echo ""; echo ""; echo ""; echo ''; echo "\n"; } echo "
ImePrezimeGodineActions
" . $row['name'] . "" . $row['surname'] . "" . $row['age'] . "
'; echo ''; echo ''; echo '
\n\n"; } catch (PDOException $e) { echo "

Error!: " . $e->getMessage() . "

"; } } else { # Bad pass check... if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_SESSION['admin']) && $_SESSION['admin'] == false) echo "Bad credentials!"; # Login form echo '
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
'; } ?>