I have been working on something which a friend asked me. He is using ezsql for his queries and i'm pretty new with it. Though i used it in the same project.
Here is the database columns and data to see it clearly
And the part of the code which fails:
$customsql = new ezSQL_mysql();
$customsql->query("SET NAMES 'utf8'");
$customsql->query("SELECT * FROM uyeler WHERE email='".escape($_POST['eposta'])."' AND sifre='".escape($_POST['sifre'])."'");
if($customsql->num_rows>0){
if($customsql->onay=='1'){
//Things to do if user is activated.
}else{
$hata='Onay:'.$customsql->onay.' -Error: Bu eposta adresiyle kayıtlı onaylanmamış bir kullanıcı var. Lütfen epostanızı onaylayın.';
$_SESSION['loggedin']=FALSE;
}
"onay" is varchar in database.
And here is the result:
While it is working in registration process, why doesn't it work here?
Thanks in advance.