I want to post ($_GET as well as $_POST) data by clicking on links (enclosed with <a>) and not the regular form ‘submit’ button. preferred language : PHP
I have seen this in a lot of todays websites,
where forms are submitted by clicking on buttons looking like hyperlinks.
so was wondering how it could be done.
Thanks in advance
This post on Ajaxian might help. It links to a pretty in depth blog post that shows you how to apply css to buttons so that they look like links.
The advantage here over using a proper link is the “fake link” really is a button, so it behaves exactly like a button, only it looks like a link. Spiders won’t follow it, screen readers will treat it differently, it’s a more “correct” thing to do in terms of launching a http post.