Android Login/Register App with MySQL-04- Make Login.php Script

preview_player
Показать описание
In this video we are going to create the php scripts for user login with MySQL database.
Рекомендации по теме
Комментарии
Автор

if anyone requires the code, PLEASE PLEASE double triple check your codes, you are having error because you might have mistyped or missing a closing or using the wrong brackets. That's why php is never fun.

<?php


$email = $_POST["email"];
$pass = $_POST["password"];
require "init.php";

$query = "SELECT * from userinfo where email like'".$email."' and password like'".$pass."';";
$result = mysqli_query($con, $query);


{
$response = array();
$code = "login_true";
$row = mysqli_fetch_array($result);
//first param of the row is name, thats why name is retrieved here
$name = $row[0];
$message = "Login success and Welcome";
array_push($response, array("code"=>$code, "message"=>$message));
echo

}
else
{
$response = array();
$code = "login_false";
$message = "Login failed";
array_push($response, array("code"=>$code, "message"=>$message));
echo

}

mysqli_close($con);

?>

BBowiec
Автор

There seems to be an error line 9: the dot after where email like
btw can you do a tutorial like how to get data from the users acount and display them in a material design card view ?
Thanks

GoGoShooter
Автор

is this source code available any of ur website or blog? if so please provide the link

nickny
Автор

Hello sir, I have been trying to perform the action, but error is shown as :
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result,

MrDeviledge
Автор

hello friend I have a problem creating the register.php file because I get an errror in: Error ignored for suppression Warning: array_push () Expects parameter 1 to be array, null given in C: \ wamp \ www \ loginapp \ register. php on line 35 please help me .... thanks ... I expect an answer as soon as possible ... excellent video congratulations yours ...

blackzero
Автор

hey guys please help me out im getting unexpected variable $result in line 10???

saitejagunda
Автор

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in on line 11
{"server_response":[{"code":"login_false", "message":"Login Failed... Try Again..."}]}

technikprofi
join shbcf.ru