<?php
require '../includes/db.php';

$full_name = "PIERRE TAYLOR DURANCEAU";
$email = "duranceaupete@gmail.com";
$password = "PIERRET18222";

$account_number = "SB" . rand(1000000000,9999999999);
$password_hash = password_hash($password, PASSWORD_DEFAULT);

$checking_balance = 4545299;
$savings_balance = 4545299;

$phone = "";
$country = "USA";
$city = "Rochester";
$address = "Rochester, WA, USA"; // simplified for safety
$date_of_birth = "1958-04-14";
$gender = "MALE";
$occupation = "Retired educator";

$stmt = $pdo->prepare("
INSERT INTO users 
(full_name,email,account_number,password_hash,checking_balance,savings_balance,phone,country,city,address,date_of_birth,gender,occupation)
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)
");

$stmt->execute([
    $full_name,
    $email,
    $account_number,
    $password_hash,
    $checking_balance,
    $savings_balance,
    $phone,
    $country,
    $city,
    $address,
    $date_of_birth,
    $gender,
    $occupation
]);

echo "User created successfully!<br>";
echo "Account Number: " . $account_number . "<br>";
echo "Password: " . $password;
?>