acheive the same as a form would, without the form
Posted: Wed Dec 29, 2004 8:06 pm
Hi all
I have been using PHP in combination with forms to do all sorts of things, and now I am in a situation where I wonder why is the form necessary at all.
Could I acheive the same with simple <a href="*"> links?
For example I made a simple content management interface where all editable pages are listed, and I placed a radio button next to each page name so that the user can choose the page by selecting the radio button, and then click on a submit button to go to the editor for the page...
Could I do just the same but by just clicking on the page name, which would be a link with a PHP action attached?
In other words, could I use any html links and attach to them PHP actions just as if these links were forms elements?
Like:
<a href="onClick='<?php do this; ?>'">myLink</a>
Thanks for any suggestions
I have been using PHP in combination with forms to do all sorts of things, and now I am in a situation where I wonder why is the form necessary at all.
Could I acheive the same with simple <a href="*"> links?
For example I made a simple content management interface where all editable pages are listed, and I placed a radio button next to each page name so that the user can choose the page by selecting the radio button, and then click on a submit button to go to the editor for the page...
Could I do just the same but by just clicking on the page name, which would be a link with a PHP action attached?
In other words, could I use any html links and attach to them PHP actions just as if these links were forms elements?
Like:
<a href="onClick='<?php do this; ?>'">myLink</a>
Thanks for any suggestions