karld Active Member Licensed User Longtime User Apr 17, 2017 #1 I have been playing with the tutorial at https://www.b4x.com/android/forum/threads/connect-android-to-mysql-database-tutorial.8339/ I want to just send a number over to a php script. The script will use that number to determine which pre-defined query to run. I want to avoid sending a full query string over. How in bloody, blue, blazes does one do this? I can't seem to figure out how to just send a POST to the php page with only the parameter I want.
I have been playing with the tutorial at https://www.b4x.com/android/forum/threads/connect-android-to-mysql-database-tutorial.8339/ I want to just send a number over to a php script. The script will use that number to determine which pre-defined query to run. I want to avoid sending a full query string over. How in bloody, blue, blazes does one do this? I can't seem to figure out how to just send a POST to the php page with only the parameter I want.
R ronell Well-Known Member Licensed User Longtime User Apr 18, 2017 #2 you can use httputils Code: Dim job1 As HttpJob job1.Initialize("job1", Me) job1.Download2(url, _ Array As String("id",txtid)) Upvote 0
you can use httputils Code: Dim job1 As HttpJob job1.Initialize("job1", Me) job1.Download2(url, _ Array As String("id",txtid))
karld Active Member Licensed User Longtime User Apr 18, 2017 #3 ronell said: you can use httputils Click to expand... Ronell, Thanks... I actually figured it out about 20 minutes ago! I was able to finally get Erel's sample code working. The biggest change was that I am only passing a number code... That is looked up by the php script and then runs the matching SQL statement. That should take care of SQL injection issues. Shoots back a json. I am going to tuck your code away in case I need it for any other projects.. Last edited: Apr 18, 2017 Upvote 0
ronell said: you can use httputils Click to expand... Ronell, Thanks... I actually figured it out about 20 minutes ago! I was able to finally get Erel's sample code working. The biggest change was that I am only passing a number code... That is looked up by the php script and then runs the matching SQL statement. That should take care of SQL injection issues. Shoots back a json. I am going to tuck your code away in case I need it for any other projects..