Hi there,
I'm displaying some information from my DB in a table, and need to know how to set the colour of just the top and bottom borders of the cell.
This is easy enough to do in just HTML, but seeing as the table is inside the PHP tags and an echo statement, I just can't figure out how to do it.
All I need to do is to set the top and bottom borders to one colour, and leave the left and right borders white/blank.
The table is being displayed in this way at the moment, it's in a While loop....
echo "<TABLE BORDER=1 CELLPADDING=0 CELLSPACING=0 BORDERCOLOR=#a4a4a4 >";
//This is your query again, the same one... the only difference is we add $max into it
$query2 = "SELECT * from user WHERE sex = '$sex12' AND location = '$location12' AND age = '$age1' $q $max";
$data_p = mysql_query($query2)
or die(mysql_error()."<br>Faulty query: ".$query2);
$rows = mysql_num_rows($data_p);
//This is where you display your query results
while ($info = mysql_fetch_array($data_p)) {
$id2 = $info['ID'];
$photo2 = $info['photo'];
$username2 = stripslashes($info['username']);
$location2 = $info['location'];
$email2 = $info['email'];
echo "
<TR>
<TD width=75 ><a href= 'masterdetails.php?id=$username2''><img src=upload_images/{$photo2} width=150 /></a></TD>
<TD width=100 border=1 border-style=\"solid\" border-color=\"RED\" align=centre>$username2<p>{$row['age']}<p>$location2</TD>
<TD width=450 border=1 border-bottom= solid 1px \"#a4a4a4\">About $username2<p>{$row['about']}</TD>
</TR>";
}
echo "</TABLE>";
Any suggestions?
Sorry, I know this is probably quite an amatuer problem, just can't figure it out though!