Hi! Could we please enable some services and cookies to improve your experience and our website?

PHPize Online / SQLize Online  /  SQLtest Online

A A A
Login    Share code      Blog   FAQ

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

Copy Format Clear
<?php // --- Password Hasher --- // VVV IMPORTANT: Replace this placeholder with the actual password you want VVV $myPassword = 'YourChosenAdminPassword'; // ^^^ IMPORTANT: Replace this placeholder with the actual password you want ^^^ // --- Don't change anything below this line --- if (empty($myPassword) || $myPassword === 'YourChosenAdminPassword') { echo "<p style='color:red; font-weight:bold;'>ERROR: Please replace 'YourChosenAdminPassword' with the actual password you want to hash inside the script!</p>"; } else { // Hash the password using the default algorithm (currently bcrypt) $hashedPassword = password_hash($myPassword, PASSWORD_DEFAULT); echo "<p><strong>Password chosen:</strong> " . htmlspecialchars($myPassword) . "</p>"; echo "<p><strong>Hashed value (copy this entire string and paste into phpMyAdmin `password_hash` field):</strong></p>"; echo "<textarea rows='4' cols='70' readonly style='font-family: monospace; padding: 5px; border: 1px solid #ccc;'>" . htmlspecialchars($hashedPassword) . "</textarea>"; } ?>

Stuck with a problem? Got Error? Ask AI support!

Copy Clear
Copy Format Clear
<?php // --- Password Hasher --- // VVV IMPORTANT: Replace this placeholder with the actual password you want VVV $myPassword = '1Skycastle'; // ^^^ IMPORTANT: Replace this placeholder with the actual password you want ^^^ // --- Don't change anything below this line --- if (empty($myPassword) || $myPassword === 'YourChosenAdminPassword') { echo "<p style='color:red; font-weight:bold;'>ERROR: Please replace 'YourChosenAdminPassword' with the actual password you want to hash inside the script!</p>"; } else { // Hash the password using the default algorithm (currently bcrypt) $hashedPassword = password_hash($myPassword, PASSWORD_DEFAULT); echo "<p><strong>Password chosen:</strong> " . htmlspecialchars($myPassword) . "</p>"; echo "<p><strong>Hashed value (copy this entire string and paste into phpMyAdmin `password_hash` field):</strong></p>"; echo "<textarea rows='4' cols='70' readonly style='font-family: monospace; padding: 5px; border: 1px solid #ccc;'>" . htmlspecialchars($hashedPassword) . "</textarea>"; } ?>
Copy Clear