Page 1 of 1

use POST in a link?

Posted: Wed Aug 13, 2014 9:21 pm
by donny
hello,

is it possible to post information to another page using a link to the page. without making a form

thank you

Re: use POST in a link?

Posted: Wed Aug 13, 2014 9:37 pm
by jdhmtl
Strictly speaking, no. A link is a GET request. Can you pass information from one page to another? Absolutely. You can append a query string to your GET request (eg. site.com/?param=value&param2=value2) or, if you don't want it in the URL, you can set session data on one page and retrieve it on another. Neither really behaves like a form, but they'll both get the job done. Query string is a better choice if you want something you can bookmark and share, sessions are a better option if you're passing data you don't want easily read.

Re: use POST in a link?

Posted: Thu Aug 14, 2014 10:11 am
by kladrian
... and beware there are limitations to the length of the URL
take a look at this https://www.google.it/webhp?sourceid=ch ... ET%20limit

bye :)