Hey all, Ok so Im getting a slightly odd result when trying to use <input type="image"> to submit a form..
What Im trying to do is have a different action occur when different form buttons are pressed, for example say I had two buttons..
<input type="submit" name="button1">
<input type="submit" name="button2">
then on the script that recieves the form Id have something like..
<?php
if(!empty($_POST['button1'])) {
//some code
}
if(!empty($_POST['button2'])) {
//some other code
}
?>
Now that works all fine but as soon as I change the input types from submit to image PHP no longer recognises them as separate buttons being submitted and $_POST['buttonname'] is empty.. any thoughts on why this is happening and how I can get around it?
Thanks in advance,
Tom