How to write and retrieve data over web for a newbie?
Posted: Sun Jan 17, 2021 6:56 pm
First: I'm new to SpiderBasic.
I have installed a simple php-file on my webserver. With that, it is possible to make entries into the mysql database on the server together by passing parameters in the url : http://xyz.com/insert_data.php?id=123&name=Blahblah
I thought of using the HttpRequest() procedure to enter data from within my SB application, but the following code is giving me an error and no entry (adapted from the SB manual):
I have a second php-file which retrieves the entered data into a html table. I'd like to use it within a WebGadget() in my SB application, but I cannot refresh the content. SetGadgetState() with the state #PB_Web_Refresh does nothing. I always have to delete the cache of my browser and restart my SB application to have a refreshed content.
How can I save and retrieve data into a web database with SpiderBasic, then?
// Moved from "Tricks 'n' Tips" to "Coding Questions" (Peter)
I have installed a simple php-file on my webserver. With that, it is possible to make entries into the mysql database on the server together by passing parameters in the url : http://xyz.com/insert_data.php?id=123&name=Blahblah
I thought of using the HttpRequest() procedure to enter data from within my SB application, but the following code is giving me an error and no entry (adapted from the SB manual):
Code: Select all
Procedure HttpGetEvent(Success, Result$, UserData)
If Success
Debug Result$
Else
Debug "HTTPRequest(): Error"
EndIf
EndProcedure
HTTPRequest(0,"http://xyz.com/insert_data.php?id=123&name=Blahblah","",@HttpGetEvent())How can I save and retrieve data into a web database with SpiderBasic, then?
// Moved from "Tricks 'n' Tips" to "Coding Questions" (Peter)