I feel a little silly asking this but I wanted everyones opinion on it.
I want to submit a page, target itself, on the press of a button but carrying one piece of data with it.
Example:
Edit | Delete
On the click on edit, I want the page to reload with $_POST['example'] === "edit"
or something. I don't want to use $_GET
and I don't want to use the ugly submit button.
Any ideas?
Create form carrying the data you want to send and send it using JavaScript when you click a link if you want to avoid submit buttons.
You should probably go ahead and use submit buttons, but use CSS to change how they look. For example:
ideally you would want to write the css out like this:
doing this will lock down those styles to ONLY being used by input tags with the appropriate class
You could use the button tag:
You can put html tags or images in to it and style it to your hearts content.
You could use Ajax to submit a POST request or style a submit button to look like a link (or whatever else you'd like).
You may submit your form via link.