vincent1971 wrote:Is it possible to send the data from an input box in html to the lua server?
I'm working on a similar case. I guess the only way is to use the form action to sent the data to a URL.
I've got a form like this:
<form action="wifi.pht">
SSID : <input type="text" name="APSSID" value="your ssid">
PW : <input type="text" name="APPASS" value="your password">
<input type="submit" value="Set new SSID/PW">
</form>
When the button is clicked the browser is pointed to URL:
http://192.168.0.27/wifi.pht?APSSID=your+ssid&APPASS=your+password
On this page you need:
1. access to the full URL ( like $_GET in PHP)
2. some Lua code to to retrieve the parameter from the URL
3. some code to use the parameter for your own purpose.
For 1. I see no other option than change the webservercode. I declared a global variable (_GET) and copy the full URL request to it. Then it will be available for some embedded Lua script in the .PHT file of the page.
Am open for a more simple approach, anybody
Let us know when you have any progress.