Application used : App Inventor , Database: Online Mysql using 000webhost.

115 views
Skip to first unread message

Ahmad Faiz

unread,
Oct 9, 2015, 8:58:21 AM10/9/15
to App Inventor Open Source Development



I got a problem when i want to retrieve the "success" from the php code to app inventor.
( In blocks = when web1.GotText , i use get responseContent)
(Is there any query or something that i need to change to get the "success" from the php )

Below are some images to help you understand my problem is,
If the question have been asked , sincerely please forward to me the link about the discussion .
Thanks in advance :)
Below are are my php code about login.


(MY PHP CODE : Login.php)

$myusername=$_GET['cust_id'];
$password=$_GET['pass'];


$SQL = "SELECT * FROM customer WHERE cust_id = '$myusername' AND pass = '$password'";
$result = mysqli_query($dbc,$SQL);


$num_rows = mysqli_num_rows($result);
if ($num_rows > 0)
{
echo "failure";
}

else
{echo "failure";}

print $csv_output;





Ghica

unread,
Oct 10, 2015, 4:32:47 AM10/10/15
to App Inventor Open Source Development
First of all, ask your question here: https://groups.google.com/forum/#!forum/mitappinventortest
That is the support forum. This is the developers forum.

Second: Did you check what your PHP really returns? It may be different from what you think. 
For example, put in a notifier yo show what the responseContent and responseCode is, or try the url you are sending in a browser, which allows you to see more easily what is going on.
Cheers, Ghica

Ahmad Faiz

unread,
Oct 10, 2015, 6:26:04 AM10/10/15
to App Inventor Open Source Development
Thanks Ghica , will be checking on that particular .
Sorry , wrong entry hehe
Reply all
Reply to author
Forward
0 new messages