Source Code of passwords_demo.php
<?php //WILL DISPLAY CODE OF THIS FILE ON THE WEBPAGE//
######################################################################
echo "<h2><br>Source Code of ".basename((string)__FILE__) . "</h2><hr>";
show_source(__FILE__);
die();
#######################################################################
?>
<?php
include("database.php");
$isAdmin = 0;
$email = "stephen.emmell@ocdsb.ca";
$username = $email;
$password = "test123";
$firstname = "Stephen";
$lastname = "Emmell";
$location = "VIRTUAL";
$query = $pdo->prepare("INSERT INTO `users`(`user_isAdmin`, `user_username`, `user_password`, `user_lname`, `user_fname`, `user_email`, `user_location`)
VALUES (:isAdmin,:username,:password,:lname,:fname,:email,:location)");
$query->execute(array(
"isAdmin" => $isAdmin,
"username" => $username,
"password" => password_hash($password,PASSWORD_DEFAULT),
"lname" => $lastname,
"fname" => $firstname,
"email" => $email,
"location" => $location
));
?>