0

Evening all,

Please could somebody take a look at the following form. Im calling

<?php if (isset($_POST['submit])){echo "clicked";}

but its not registering. The only difference is that this is the first time ive used the "image" type.

any help would be appreciated

<form method="POST">
            <table width="468" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="21" valign="middle">&nbsp;</td>

                <td width="79" valign="middle"><input name="hours" type="text" class="consolePlaceBidForm" onfocus="clearValues(this);cancelPostback();" onBlur="javascript:startAutoPostback();" Value="Hours" /></td>
                <td valign="middle" style="padding-right:7px"><b>:</b></td>
                <td width="79" valign="middle"><input name="minutes" type="text" maxlength="2"  class="consolePlaceBidForm" onfocus="clearValues(this);cancelPostback();" onBlur="javascript:startAutoPostback();" Value="Minutes" /></td>
                <td valign="middle" style="padding-right:7px"><b>:</b></td>
                <td width="79" valign="middle"><input name="seconds" type="text" maxlength="2"  class="consolePlaceBidForm" onfocus="clearValues(this);cancelPostback();" onBlur="javascript:startAutoPostback();" Value="Seconds" /></td>
                <td valign="middle" style="padding-right:7px"><b>.</b></td>
                <td width="79" valign="middle"><input name="tenths" type="text" maxlength="1"  class="consolePlaceBidForm" onfocus="clearValues(this);cancelPostback();" onBlur="javascript:startAutoPostback();"  Value="Tenths" /></td>

                <td width="131" valign="middle"><input type="image" name="submit" src="images/console_button_place_bid.gif" alt="Place Bid" style="border-style:None;border-width:0px;" /></td>
              </tr>
            </table>
            </form>
4
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by rajarajan07
0

It should work, seeing your code. Perhaps change the name of the input to "submitbutton' to avoid complications, also do not use the alt attribute. If that doesn't work, perhaps you should use the following:

<form method="post" name='BidForm'>
... The rest of the table...
<img src='images/console_button_place_bid.gif' alt='Place Bid' onmouseover='this.style.cursor="pointer"' onclick='document.BidForm.submit()' />
</form>

~G

0

Hi pzuurveen, thank you, i did spot that. Still no luck.

Very confusing

0

Hi all,

I managed to solve it.

Still didnd get to the bottom as to why it wasnt working, but i gave the button an ID and styled it in css. All works dandy now.

thanks for everybodys help

regards

paul

0
<html> 
<head> 
</head> 
<body>
<?php
if (!isset($_POST['submit'])) { 
?>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF'] ?>" name="myform">
<button name="submit" type="submit"><img src="Buttons/submitUp.gif" alt="Submit Form" name="submit" width="94" height="20" border="0" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('submit','','Buttons/submitOver.gif',1)"></button>
</form>

<?php
}
else
{
  echo "Clicked";
}
?>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.