Created
March 7, 2020 07:06
-
-
Save webtechriser/d25b8dd18c644526d910533e81082bb4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Connect to mySQL First | |
$connection = mysql_connect( 'localhost', 'user_123', 'password_123' ); | |
//Select Database | |
mysql_select_db( 'database_123' ); | |
//Reset password with SQL UPDATE Query | |
$SQL="UPDATE wp_users SET user_pass = MD5('newPassword') WHERE user_login = 'admin'"; | |
//If everything's OK, your password will be reset | |
if( mysql_query( $SQL ) ) { | |
echo "Your password was succesfully reset!"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment