2014-12-24 304 views
-5

我想créât會員區登錄在一個網站,但我有一個PHP代碼中的困難,但真正的問題是在我的分貝,所以我不知道哪裏是問題登錄/註冊系統與PHP和MySQL

(!) SCREAM: Error suppression ignored for 
(!) Deprecated: mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead. in C:\wamp\www\EM\inscription.php on line 15 
Call Stack 
# Time Memory Function Location 
1 0.0016 267504 {main}() ..\inscription.php:0 
2 0.0081 275440 mysql_escape_string () ..\inscription.php:15 
Erreur SQL ! 
SELECT login(*) FROM membre WHERE login="Nassim Hasnaoui" 
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*) FROM membre WHERE login="Nassim Hasnaoui"' at line 1 
+1

這不是有效的SQL。 –

+1

爲什麼括號中的通配符?你想要選擇什麼?它應該是'SELECT登錄FROM MEMRE WHERE登錄=「Nassim Hasnaoui」'或'SELECT * FROM membre WHERE登錄=「Nassim Hasnaoui」' –

回答

0

更改您的當前代碼到下面並嘗試。

SELECT login(*) FROM membre WHERE login="Nassim Hasnaoui" 

SELECT * FROM membre WHERE login="Nassim Hasnaoui" 

mysql_escape_string() 

mysql_real_escape_string()