amg182
05-27-2011, 11:34 PM
Hi guys.
Need some help please!
I have a table that has data from mysql in it. I have managed to get the text in the rows to hyperlink, but want to remove the underline.... Ideally I would like it to come back when hover on mouse. Can anyone help me? I tried style=decoration: none etc but to no avail as its text from mysql and not the actual webpage. Here is my code so far. Note the style attributes work on text on the page but not on the text that is in the mysql database.
:confused:
<?php
$con = mysql_connect("host","dbase","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("a5525005_cars", $con);
$result = mysql_query("SELECT * FROM `cars` ORDER BY Location");
echo "<table border='0'>
<tr style=font-family:verdana;font-size:110%;color:red;>
<th>Photo</th>
<th>Location</th>
<th>Model</th>
<th>Price</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr style=font-family:verdana;font-size:150%;color:blue;style='text-decoration:none'>";
echo "<td>" . $row[""] . "<img src=\"" . $row["Photo"] . "\"></a>";
echo "<td><a href=\"" . $row['URL'] . "\">" . $row['Location'] ."</a></td>";
echo "<td><a href=\"" . $row['URL'] . "\">" . $row['Model'] . "</a></td>";
echo "<td><a href=\"" . $row['URL'] . "\">" . $row['Price'] . "</a></td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>
Need some help please!
I have a table that has data from mysql in it. I have managed to get the text in the rows to hyperlink, but want to remove the underline.... Ideally I would like it to come back when hover on mouse. Can anyone help me? I tried style=decoration: none etc but to no avail as its text from mysql and not the actual webpage. Here is my code so far. Note the style attributes work on text on the page but not on the text that is in the mysql database.
:confused:
<?php
$con = mysql_connect("host","dbase","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("a5525005_cars", $con);
$result = mysql_query("SELECT * FROM `cars` ORDER BY Location");
echo "<table border='0'>
<tr style=font-family:verdana;font-size:110%;color:red;>
<th>Photo</th>
<th>Location</th>
<th>Model</th>
<th>Price</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr style=font-family:verdana;font-size:150%;color:blue;style='text-decoration:none'>";
echo "<td>" . $row[""] . "<img src=\"" . $row["Photo"] . "\"></a>";
echo "<td><a href=\"" . $row['URL'] . "\">" . $row['Location'] ."</a></td>";
echo "<td><a href=\"" . $row['URL'] . "\">" . $row['Model'] . "</a></td>";
echo "<td><a href=\"" . $row['URL'] . "\">" . $row['Price'] . "</a></td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>