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>

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!