K keylab83 Member Licensed User Longtime User Feb 27, 2011 #1 can someone help me with mysql,i need example urgently.pls guys i need to know if there is any possibility to send sql data or any data to mysql on server in Internet. i`m new in developing any apps for android and example will be the best way.Apologias for my English is not very good and i hope you guys can understand what i need.Tanks in advance
can someone help me with mysql,i need example urgently.pls guys i need to know if there is any possibility to send sql data or any data to mysql on server in Internet. i`m new in developing any apps for android and example will be the best way.Apologias for my English is not very good and i hope you guys can understand what i need.Tanks in advance
Erel B4X founder Staff member Licensed User Longtime User Feb 27, 2011 #2 It is difficult to give you a complete example. You need to create a web service (with PHP for example) that accesses the database. Then use the HTTP library to call this web service from the device. Upvote 0
It is difficult to give you a complete example. You need to create a web service (with PHP for example) that accesses the database. Then use the HTTP library to call this web service from the device.
K keylab83 Member Licensed User Longtime User Mar 6, 2011 #3 Erel said: It is difficult to give you a complete example. You need to create a web service (with PHP for example) that accesses the database. Then use the HTTP library to call this web service from the device. Click to expand... :sign0085: can you give me just a little example how to do that.in the wast week i`m stock on that i feel like the most stupid person on this world.Pls guys can you give me direction. thank you Upvote 0
Erel said: It is difficult to give you a complete example. You need to create a web service (with PHP for example) that accesses the database. Then use the HTTP library to call this web service from the device. Click to expand... :sign0085: can you give me just a little example how to do that.in the wast week i`m stock on that i feel like the most stupid person on this world.Pls guys can you give me direction. thank you
Erel B4X founder Staff member Licensed User Longtime User Mar 6, 2011 #4 You should start by implementing the web service. This part cannot be written with Basic4android. You should choose your preferred language (PHP, ASP, ASP.Net...). Upvote 0
You should start by implementing the web service. This part cannot be written with Basic4android. You should choose your preferred language (PHP, ASP, ASP.Net...).
K keylab83 Member Licensed User Longtime User Mar 6, 2011 #5 Erel said: You should start by implementing the web service. This part cannot be written with Basic4android. You should choose your preferred language (PHP, ASP, ASP.Net...). Click to expand... thank you for your quick replay.I ready create PHP script directing input data to mysql database,but i can`t figure-out how to send that data from my android device using b4a to my web page.if I figure-out once how to do that,how to make my php to input into mysql database the income information from my android to my web page , everything els shout be easy.if you have any suggestion pls help me.using get or post method and submitting information is working but how to submit this data in my web page. thank you in advance,I really hope you understand my question. T.A Upvote 0
Erel said: You should start by implementing the web service. This part cannot be written with Basic4android. You should choose your preferred language (PHP, ASP, ASP.Net...). Click to expand... thank you for your quick replay.I ready create PHP script directing input data to mysql database,but i can`t figure-out how to send that data from my android device using b4a to my web page.if I figure-out once how to do that,how to make my php to input into mysql database the income information from my android to my web page , everything els shout be easy.if you have any suggestion pls help me.using get or post method and submitting information is working but how to submit this data in my web page. thank you in advance,I really hope you understand my question. T.A
Erel B4X founder Staff member Licensed User Longtime User Mar 6, 2011 #6 Send the parameters from the Android app to the PHP script as a GET method: yourserver.com... In the PHP script take the parameters by calling $_GET["parameter1"]. Issue the query and write the results using some simple format. Read the results from the Response object. See the CurrencyConverter for a simple example of using the HTTP library: http://www.b4x.com/forum/basic4andr...urrency-converter-http-web-services-more.html Upvote 0
Send the parameters from the Android app to the PHP script as a GET method: yourserver.com... In the PHP script take the parameters by calling $_GET["parameter1"]. Issue the query and write the results using some simple format. Read the results from the Response object. See the CurrencyConverter for a simple example of using the HTTP library: http://www.b4x.com/forum/basic4andr...urrency-converter-http-web-services-more.html
K keylab83 Member Licensed User Longtime User Mar 6, 2011 #7 Erel said: Send the parameters from the Android app to the PHP script as a GET method: yourserver.com... In the PHP script take the parameters by calling $_GET["parameter1"]. Issue the query and write the results using some simple format. Read the results from the Response object. See the CurrencyConverter for a simple example of using the HTTP library: http://www.b4x.com/forum/basic4andr...urrency-converter-http-web-services-more.html Click to expand... it is still to difficult for me.What about using InitializePost2 from http library, this is looking more easy for me, but i still did`t find any examples how exactly to use InitializePost2. Thank you again Upvote 0
Erel said: Send the parameters from the Android app to the PHP script as a GET method: yourserver.com... In the PHP script take the parameters by calling $_GET["parameter1"]. Issue the query and write the results using some simple format. Read the results from the Response object. See the CurrencyConverter for a simple example of using the HTTP library: http://www.b4x.com/forum/basic4andr...urrency-converter-http-web-services-more.html Click to expand... it is still to difficult for me.What about using InitializePost2 from http library, this is looking more easy for me, but i still did`t find any examples how exactly to use InitializePost2. Thank you again
Erel B4X founder Staff member Licensed User Longtime User Mar 6, 2011 #8 Here is an example of InitializePost2 (found by searching B4A-HelpViewer for InitializePost2): http://www.b4x.com/forum/basic4andr...-how-send-data-form-using-http.html#post41501 Upvote 0
Here is an example of InitializePost2 (found by searching B4A-HelpViewer for InitializePost2): http://www.b4x.com/forum/basic4andr...-how-send-data-form-using-http.html#post41501
K keylab83 Member Licensed User Longtime User Mar 6, 2011 #9 Erel said: Here is an example of InitializePost2 (found by searching B4A-HelpViewer for InitializePost2): http://www.b4x.com/forum/basic4andr...-how-send-data-form-using-http.html#post41501 Click to expand... couple minutes ago i find same post,can i ask you for one last thing pls. can you share with me that php script what you write for example(http://www.b4x.com/print.php) i just want to see how you connect b4a with php. thank you again Upvote 0
Erel said: Here is an example of InitializePost2 (found by searching B4A-HelpViewer for InitializePost2): http://www.b4x.com/forum/basic4andr...-how-send-data-form-using-http.html#post41501 Click to expand... couple minutes ago i find same post,can i ask you for one last thing pls. can you share with me that php script what you write for example(http://www.b4x.com/print.php) i just want to see how you connect b4a with php. thank you again
Erel B4X founder Staff member Licensed User Longtime User Mar 6, 2011 #10 Sure: Code: <?php print "POST variables:\r\n"; var_dump($_POST); print "\r\nGET variables:\r\n"; var_dump($_GET); ?> Upvote 0
Sure: Code: <?php print "POST variables:\r\n"; var_dump($_POST); print "\r\nGET variables:\r\n"; var_dump($_GET); ?>