Re: $_POST[] variable?

2018-08-02 Thread Richard Gaskin via use-livecode

Tim Selander wrote:

> Is it possible to manipulate the contents of the $_Post[] global
> directly on Livecode serve?
>
> When I reload a page, the values in the array still have the values in
> them from the previous time the "Submit" button was used... efforts to
> delete or put empty into, do not seem to work.

I wonder if the problem may be that the browser is caching the result of 
the last call to the CGI?


On the server side, any CGI (whether it be LC Server, PHP, Python, or 
any other engine) is launched, executes, and dies with each request.


As such, environment variables can't help but be fresh, as the process 
is not persistent between requests.


As a diagnostic step I would use a browser's debugging tools to watch 
that request carefully.


If your API expects only LC clients without supporting generic browsers, 
the detailed logging option for libURL may be helpful, using a spare 
field to display some of the transaction details:

https://livecode.com/resources/api/#livecode_script/liburlsetlogfield

You may also consider the old trick of appending the URL with a random 
string in the non-actionable part of the URL beyond a hash tag, e.g.:


  https://someserver.com/cgi-bin/myscript.lc#123456789

...where "123456789" is the millisecs, so that each request is seen by 
libURL as unique (which I believe also works with tsNet; Charles may 
have additional guidance).


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


$_POST[] variable?

2018-08-02 Thread Tim Selander via use-livecode

Hi,

Is it possible to manipulate the contents of the $_Post[] global 
directly on Livecode serve?


When I reload a page, the values in the array still have the values in 
them from the previous time the "Submit" button was used... efforts to 
delete or put empty into, do not seem to work.


Thanks.

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode