LiveCode Server latency causing empty results
Roger Eller
roger.e.eller at sealedair.com
Fri Aug 7 17:35:22 EDT 2015
In the multiLine messageBox, I have this script:
---------------------
put empty into tForm
put "http://myServer/post_this.lc" into tUrl
put "dave" into tName put "hello" into tMessage
if libURLMultipartFormData (tForm, "name", tName, "message", tMessage) is
not empty then
answer it ##error
else
set the httpHeaders to line 1 of tForm
post line 2 to -1 of tForm to url tUrl
## check the result, etc., here
set the httpHeaders to empty
end if
---------------------
In a "post_this.lc" file in the www root, I have this:
I THINK THIS IS WHAT I DON'T FULLY UNDERSTAND. Nothing is returned
when I execute the script in the messageBox.
---------------------
<?lc
put receiveThis($_POST["name"],$_POST["tName"]) into tUser
put receiveThis($_POST["message"],$_POST["tMessage"]) into tMessage
?>
<?lc
function receiveThis tUser,tMessage
return tUser && tMessage
end whoistUser
?>
---------------------
~Roger
On Fri, Aug 7, 2015 at 1:14 PM, Mike Bonner <bonnmike at gmail.com> wrote:
> put "name1=value1&name2=value2&name3=value3" into tPost
> post tPost to URL <whatever.Url.com>
>
> Its also handy to use liburlformdata to build your post string
> also liburlmultipartformdata and liburlmultipartformaddpart
>
More information about the use-livecode
mailing list