<?php
$hash = password_hash('admin123', PASSWORD_DEFAULT);
echo $hash . PHP_EOL;
echo (password_verify('admin123', $hash) ? 'VERIFIED OK' : 'FAILED') . PHP_EOL;

// Update in DB directly
$db = new PDO('mysql:host=localhost;dbname=naveed_trader_db;charset=utf8mb4', 'root', '');
$stmt = $db->prepare("UPDATE users SET password_hash = ? WHERE username = 'admin'");
$stmt->execute([$hash]);
$stmt2 = $db->prepare("UPDATE users SET password_hash = ? WHERE username = 'mns101'");
$stmt2->execute([$hash]);
echo "Database updated for admin and mns101" . PHP_EOL;
