Postingan lainnya
Syntax error
You have an error in your SQL syntax;check the manual that corresponds to your MySQL server version for right syntax to user near'-login where username = 'admin'and password = md5('admin') at line 1
Kodingnya: $sql = mysql_query("select * from tb-login where username= '$user' and password = md5('$pass')") or die (mysql_error());
5 Jawaban:
coba seperti ini gan :
<pre> $sql = mysql_query("select * from tb-login where username= '$user' and password = '$pass'") or die (mysql_error()); </pre>
Localhost, Username, Password, Nama Database, nya belum dibuat. dan dimasukkan seperti: $localhost = 'localhost'; $username = 'root'; $password = ''; $database = 'Name your Database';
$conn = mysqli_connect($localhost, $username, $password, $database); $sql = mysqli_query($conn, "select * from tb-login where username= '$user' and password = '$pass'") or die (mysql_error());
Kurang Lebih begitu ! koreksi bila salah
coba nama tabelnya ganti tanda strip "-" menjadi underscore "_". jadinya tb_login
cek nama tablenya, gunakan "_" underscore untuk pemisah