Here's a script that belongs in a button next to a field:

local temp,w

on mouseUp
  accept connections on port 8080 with message "newconnect"
  if the result is not empty then  put the result
end mouseUp

on newconnect s
  put s into w
  read from socket s  until empty
  put it into temp
  read from socket s   with message "nread"
end newconnect

on nread a,b #a is the socket and b is the actual data
  put b after temp
  write cr&cr&"TEST RESULT OK " && the date to socket a
  close socket a
  close socket w
  put temp into fld 1
end nread

When the client sends forms data to the server using POST field 1 will
contain all data from the client and the server will reply  "TEST RESULT OK
" && the date which you should see in the browser.
What you do with the data is up to you. The reason I use 2 messages is that
the first one doesn't return all the stuff. It can be improved.

Regards, Andu

Reply via email to