我如何创建系统,例如当我的 mySQL 插入昵称时:,,Sprunkas'' 并说不仅可以使用 ,,Sprunkas'' 还可以使用 ,,SPRUNKAS'', ,,sprunkas'' 等登录?这是我的一些PHP代码:
if(isset($_POST['jungtis'])) {
if($_POST['login_slapyvardis'] != "" && $_POST['login_slaptazodis'] != "") {
$login_slapyvardis = mysql_real_escape_string($_POST['login_slapyvardis']);
$login_slaptazodis = mysql_real_escape_string($_POST['login_slaptazodis']);
$apsaugotaslogin_slaptazodis = md5($login_slaptazodis);
if($login_db == $login_sumazintas) {
$mysql = mysql_query("SELECT * FROM ucp_users WHERE name='$login_slapyvardis'") or die(mysql_error());
$mysqlskc = mysql_fetch_assoc(mysql_query("SELECT * FROM ucp_users WHERE name='$login_slapyvardis'"));
$login_sumazintas = strtolower($login_slapyvardis);
$login_db = strtolower($mysqlskc['name']);
$mysqli = mysql_fetch_array($mysql);
if($mysqli['password'] == $apsaugotaslogin_slaptazodis) {
$_SESSION['Logged'] = $mysqli['id'];
$ip = $_SERVER['REMOTE_ADDR'];
mysql_query("UPDATE ucp_users SET lastip = '$ip' WHERE id = '$mysqli[id]'");
header('Location: /home');
提前感谢您的帮助!