Hello
I need help for a basic php command because i don't understand php well. Currectly in my php code i have
i send the parameters from my app as girdi1,girdi2 and girdi3. This works well for a registeration process. What I want to add is , I have a different table called tblblocked . I also want to check if the "girdi3" exists in the tblblocked. ( girdi 3 is the device id , so if the device id is in block list i dont want to accept the registration.) tblblocked has only 1 coloums and it is deviceid. So basicly i have to add after -username already exist check - if girdi3 is in the tblblocked under coloumn deviceid. Can you help me add it to code.
TY
I need help for a basic php command because i don't understand php well. Currectly in my php code i have
B4X:
case "1":
$cihaz = clean($_GET["girdi3"]);
$uname = clean($_GET["girdi1"]);
$passw = clean($_GET["girdi2"]);
$q = "SELECT username FROM tblusers WHERE username = '".$uname."'";
$r = mysql_query($q);
if ( mysql_num_rows($r) > 0 )
{
print json_encode('This username already exists');
} else {
$q = mysql_query("INSERT INTO tblusers (username,password,cihazid) VALUES ('$uname', '$passw', '$cihaz')");
print json_encode("Inserted");
}
break;
i send the parameters from my app as girdi1,girdi2 and girdi3. This works well for a registeration process. What I want to add is , I have a different table called tblblocked . I also want to check if the "girdi3" exists in the tblblocked. ( girdi 3 is the device id , so if the device id is in block list i dont want to accept the registration.) tblblocked has only 1 coloums and it is deviceid. So basicly i have to add after -username already exist check - if girdi3 is in the tblblocked under coloumn deviceid. Can you help me add it to code.
TY