updated pdo

This commit is contained in:
Joshua Perry 2022-11-20 13:20:38 +00:00
parent 0ed5380f58
commit 3f234df89a
1 changed files with 2 additions and 0 deletions

View File

@ -10,11 +10,13 @@ $pageContent = '<p>Don\'t have an account?<a href=\'register.php\'>Click here to
</form>';
$stylesheet = '../assets/ibuy.css';
require '../../layout.php';
$server = 'mysql';
$username = 'student';
$password = 'student';
$schema = 'assignment1';
$pdo = new PDO('mysql:dbname=' . $schema . ';host=' . $server, $username, $password);
if (isset($_POST['submit'])) {
$stmt = $pdo->prepare('SELECT * FROM users WHERE email = :email');
$values = [