如何在具有标准LAMP堆栈的Linux机器上安装Magento比特币货币扩展?
我已经搜索过,阅读文档,并将文件放在根Magento目录中(正如说明中所述:https://github.com/ticean/magento-bitcoin/wiki/Installation).
所以我有一个用户名和密码表格发布数据到这个process.php文件.但是我的代码中的陷阱错误表明mysql查询有问题:"用户名和密码不匹配.我们将在两秒钟内将您带回登录页面."
md5工作正常,我检查了数据库表中的所有行以及它应该是什么.有什么建议?谢谢戴夫.
<?php
//Code DavidMaitland.me 2011
//Process data from the login form
require('database.php');
$username = mysql_real_escape_string($_POST["username"]);
$password = mysql_real_escape_string(md5($_POST["password"]));
$client_query = mysql_query("SELECT * FROM clients WHERE client_username='$username' and client_password='$password'") or die (mysql_error());
$client_data = mysql_fetch_array($client_query, MYSQL_ASSOC);
if(mysql_num_rows($client_data) == 1) {
session_start();
$_SESSION['client_id'] = $client_data['id'];
header('Location: account.php');
} else {
echo "The username and password don't match. We will take you back to the login page in two seconds.";
header('Refresh: 2; url=index.php');
}
?>
Run Code Online (Sandbox Code Playgroud)