325
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
Here is a modified login example:
In the event handler for the on_sock_postdata event we extract available HTTP
variable data and process it. The event will be called as many times as necessary.
For example, we may save the data into a file:
Sub
On
_sock_postdata()
fd.setdata(sock.gethttprqstring(255))
'very simplified, but illustrates
the point
End
Sub
Then, in the HTML file. It is necessary to remember that a portion of the HTTP
variable data may still be unhandled by the time you get here:
<html><body>
<?
While
sock.httprqstring<>""
'extract the remaining part of the
variable data
fd.setdata(sock.gethttprqstring(255))
Wend
?>
</body></html>
It is unlikely that user login will require such careful handling. User name and
password will comfortably fit in 255 bytes, unless you users are paranoid and have
humongous passwords. Still, there are many situation when you need to send