form tag table background and php code -
08-03-2004
, 08:27 PM
Hi,
I've discovered something that's causing me a bit of a headache and I hope
there's a quick solution. When I'm designing a .php page with a table inside a
form tag, once you place the code "<?php echo $PHP_SELF ?" into the action
attribute of the form tag, you can no longer see the background color and other
formating of the table within the form tag - instead all cells within the table
are a light blue-green color. Without the echo $PHP_SELF call, you can see the
background colors. This problem occurs inside the dreamweaver design view only
- the page displays fine online, but is a headache because if I make any
changes to the layout of the table I have to post the page to the web to view
the changes I've made. Why is this and is there a way for me to fix this so
that I can still see the background colors etc within the dreamweaver design
view? Here's an example code:
// the following will not display the red background
<form action="<?php echo $PHP_SELF ?>">
<table width="100%" border="0">
<tr bgcolor="#666699">
<td width="20%" bgcolor="#FF3333"> </td>
<td width="75%" bgcolor="#FF3333"> </td>
<td width="5%" bgcolor="#FF0000"> </td>
</tr>
</table></form>
// the following code (note - no $PHP_SELF in the action) will display the red
background.
<form action="<?php ?>">
<table width="100%" border="0">
<tr bgcolor="#666699">
<td width="20%" bgcolor="#FF3333"> </td>
<td width="75%" bgcolor="#FF3333"> </td>
<td width="5%" bgcolor="#FF0000"> </td>
</tr>
</table></form> |