Get and Post

Get and Post variables let you send variables between you pages. E.g. when submitting a form, or paging through through the results of search on website.


Get variables are usually passed via a url (they can also be passed through a form when the method is set to get).

e.g. If a url was accessing the page with the url:, you can access the search variable like so:

put $_GET["search"] // outputs: livecode


Post variables are typically passed when data is submitted via a form.
Post variables can be accessed in the exact same way as get variables, just using $POST instead.

put $_POST["search"]

Encoding GET parameters

When you are submitting data via a url, the data should be url encoded:

put urlEncode("For mice and men") // outputs: For+mice+and+men

Leave a Reply