使用php和mysql进行md5哈希登录 [英] md5 hash login with php and mysql

查看:135
本文介绍了使用php和mysql进行md5哈希登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到一个包含大约450个用户名和密码的excel文件(密码用MD5哈希编码)
如何将这个excel(.xls)文件放到我的MySQL数据库和网站上(php端)我如何检查用户输入的密码是否是正确的密码(我对MD5或任何散列序列散列密码一无所知)

I was given an excel file with about 450 username and passwords (the passwords are encoded with MD5 hash) How can I put this excel (.xls) file into my MySQL database and on the website (php side) how can I check if the user entered password is the correct password (I know nothing about hashing a password with MD5 or any hash-sequence for that matter)

推荐答案

1.-您可以将excel文件导出为CSV文件。

2.-使用 phpmyadmin 将CSV文件导入到您的网站。

3.-检查密码:

1.- You can export an excel file as a CSV file.
2.- Use phpmyadmin to import to your site a CSV file.
3.- Checking passwords:

if (md5($_POST['user_password']) == $db['user_password'])
{
    echo 'welcome back bro!'
}

这篇关于使用php和mysql进行md5哈希登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆