Jump to content

Problem with <form><td></td></form>


KiwiDave

Recommended Posts

Hi,

Got this little issue. It is to do with an image button and how it is displayed on screen

 

Now I have a button in a table field. I have code like this:

 

echo "<FORM ACTION = 'options.php' METHOD = 'GET'><TD align = 'center'>";

echo "<INPUT type = 'hidden' name='opt' value = '2'>";

echo "<INPUT type = 'hidden' name='user' value = '$user'>";

echo "<INPUT type = 'image' src='$deleteimg' value='Submit'></TD></FORM>”;

 

This works sweet in Internet Explorer and the formatting is great but Firefox and Safari do not like it and won’t show the image. Explorer and Firefox examples are shown below:

 

However I do this (moving the form inside the TD)

 

echo "<TD align = 'center'><FORM ACTION = 'options.php' METHOD = 'GET'>";

echo "<INPUT type = 'hidden' name='opt' value = '2'>";

echo "<INPUT type = 'hidden' name='user' value = '$user'>";

echo "<INPUT type = 'image' src='$deleteimg' value='Submit'></FORM></TD>”;

 

It works in Explorer, Firefox and Safari but the formatting comes out screwed up. Its appears to add a line to the bottom of the image making the single row now twice the size in space. It is almost as if it was creating a blank label at the bottom of the image.

 

Does anyone know why this is happening and what workaround there is so I can have the formatting of the first example and also have it compatible with Firefox and Safari.

 

Link to comment
https://forums.phpfreaks.com/topic/118442-problem-with/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.