Jump to content

[SOLVED] PHP in html files


cearlp

Recommended Posts

Hello,

Don't know if this is the correct forum for my question but here goes...

I use PHP within an html file to generate table data. The table data are links and by default they are underlined. I want to eliminate the underlining and have tried to do this using CSS and a rule for anchors. Ex: a {text-decoration: none;}  This does not work and I can only think that it is because the <td>.....</td> is generated with an echo statement in PHP.

Here is the code:

echo "<tr style='background color:$bgcolor;'><td><a href='".$_SERVER['PHP_SELF']."?memberid=$id'>$name</a></td></tr>";

The html page is rendered correctly and the links work as planned. I just want to get rid of the underlines under the name.

Any thoughts?

 

Link to comment
https://forums.phpfreaks.com/topic/132035-solved-php-in-html-files/
Share on other sites

All php code is executed before it is sent to the browser, so there's no way php could mess up your css. Debug as if php isn't even there (assuming the html under view-source looks okay). Is there another css property below the one you're defining that overrides the anchor setting you're trying to use to change the underlining?

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.