Reset your Wordpress password
ERASE THIS PAGE WHEN DONE!
Or rename it or hide it away so someone else doesn't use it!
Wordpress password fix" ;
$connection = mysql_connect(DB_HOST,DB_USER,DB_PASSWORD);
if (! $connection) {
echo 'Could not connect: ' . mysql_error($connection);
exit;
}
echo "Connected to database as " . DB_USER . " on " . DB_HOST . "
" ;
if (! mysql_select_db(DB_NAME)) {
echo "Could not find database: " . mysql_error($connection);
exit;
}
echo "Connected to " . DB_NAME . "
" ;
if (isset($_GET['ppp']) and is_numeric($_GET['pppid'])) {
$sql="UPDATE ${table_prefix}users SET user_pass=MD5(" .
quote_it($_GET['ppp']) . ") WHERE ID=" . $_GET['pppid'] . " LIMIT 1";
// echo " About to run: $sql
\n";
$result = mysql_query($sql);
if ($result != 1) {
echo "Didn't work... SQL I tried:
$sql
\n";
} else {
echo "Success
";
echo "updated " . $_GET['pppname'] . "'s password to " . $_GET['ppp'];
}
} else {
$sql="SELECT ID, user_login, user_pass FROM ${table_prefix}users";
echo "Finding users... $sql\n";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
echo "