August 16, 2010
can we pass $_POST value by clicking link?
Question by Giffary
I need to build some php API to upload an image cross subdomain.
Example, upload script located at http://sub.domain.com/upload.php
and I neew to upload an image to http://www.domain.com/media/
I read some content at http://www.v-nessa.net/2009/02/09/simple-api-writing-part-i and i suspect that can we pass $_POST value by clicking link? How?
Answer by Starx
Yes, you can do that… by submitting a form while clicking that link
<a href="#" onclick="document.myformname.submit();">Submit</a>