mardi 5 février 2019

IF conditon with and or not working in php

I am using if statement in php,I want if user not enter login id or usernamd+password then showing error message but not working,here is my code

if($add_data['social_id']!="" || $add_data['username'] && $add_data['password']=="")
    {
        //login with social id code here
    }
elseif($add_data['username'] && $add_data['password']!="" || $add_data['social_id']=="")
    {
        //login with usernamd and password code here
    }
else
    {
        //please enter social id or username with password
    }   

Aucun commentaire:

Enregistrer un commentaire