Page 1 of 1
Sumbit button as normal link
Posted: Wed Aug 25, 2004 4:08 pm
by dwfait
Hi. How would you make a normal a href link be a submit button in a form?
EDIT: or a submit button as an image or text?
Posted: Wed Aug 25, 2004 4:22 pm
by feyd
Posted: Wed Aug 25, 2004 4:58 pm
by dwfait
i dont think thats quite what i want...
What i need is:
An image, in a form, to act as the submit button.
Posted: Wed Aug 25, 2004 5:03 pm
by feyd
that's for your first part.. the image buttons.. are standard html.. form images.. I believe a search engine will find that information for you.
Posted: Wed Aug 25, 2004 6:08 pm
by dwfait
I think ill stick to submit buttons then, lol, thanks anyway.
Posted: Wed Aug 25, 2004 8:55 pm
by Illusionist
Posted: Wed Aug 25, 2004 8:57 pm
by Illusionist
and if you want jsut a text link to submit, you can do
Code: Select all
<a href="#" onclick="javascript:document.formname.submit();">Submit</a>
Posted: Thu Aug 26, 2004 8:23 am
by Bill H
To use an image as a submit button:
Code: Select all
<input type=image src="okay.gif" name="Okay">
The submission sends two $_POST (or $_GET) vars: Okay_x and Okay_y which indicate the coordinates within the image at which the button was clicked, so you need to check for the button like:
Code: Select all
<?php
if (isset($_POST['Okay_x']))
?>