I use the HttpJob to make a login process, a PHP script will return the result of login.
But how to get the echo string of PHP in JobDone ?
Any help will be appreciate it.
B4X:
<?php
echo "Login failed!!";
?>
But how to get the echo string of PHP in JobDone ?
B4X:
Sub cmdSubmit_Click
Dim jobPost As HttpJob
jobPost.Initialize("JobPostName",Me)
jobPost.PostString("http://website.com/test.php","user="&etUser.Text&"&pass="&etPass.Text)
End Sub
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "JobPostName"
ToastMessageShow("Result:" , True)
End Select
Else
Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub
Any help will be appreciate it.