FORM <input type=image ...> with a posting value

From: Date: Fri, 06 Apr 2001 19:07:09 +0000
Subject: FORM <input type=image ...> with a posting value
Groups: php.general 
Request: Send a blank email to php-general+get-47495@lists.php.net to get a copy of this message
I have a page with multiple form submit buttons that carry different values to do different functions and such. <form name="bidfile" method=post action="<?=$ME?>"> <input type=submit name="mode" value="Edit Contacts"> <input type=submit name="mode" value="Add Products"> <input type=text name="something" value="<?=$something?>"> ... </form> <? switch (nvl($mode)) { case "Edit Contacts" : save_changes($HTTP_POST_VARS); add_contact_info($bid_id); break; case "Add Products" : save_changes($HTTP_POST_VARS); add_bid_items($bid_id); break; ... } ?> Which works great!! However, I grow tiresome of the typical button "look", and in my attempt to use an image instead: <input type=image name="mode" value="Edit Contacts" src="contacts.png"> failed. Is there a way to do this? I have changed my stylesheet to have the form inputs and whatnot to view smaller which I like. But not small enough in some instances, forcing me to look to other ways, such as an image. So as I asked before, is there a way to do this or any other suggestions?

« previous php.general (#47495) next »