Page 1 of 1

Background colour of table.

Posted: Thu Jul 28, 2005 8:49 am
by Magicman0022
Just starting out in the world of php, so this is probably a pretty simple problem

I have a simple php script that calls up data from a mysql database and displays it in my webpage. However when it displays the infomation it does so on a white background. The rest of my website has a specific background color. How can i apply this in my php page. I have tried placing the code inside the relevant table tags but it doesn't work.

Any help will be appreciated

Posted: Thu Jul 28, 2005 9:02 am
by pilau
Are you using CSS?
If you are, then you must <link rel="sty... it on the php document as well as the rest of the pages.

Background

Posted: Thu Jul 28, 2005 11:01 am
by Magicman0022
I am a total novice.

How do I know if I am using CSS.

The relevant code that I am using is produced below.

<table>
<tr>
<td>

<pre>
<?php


//convert field values to md5value and escape any quotes.
$Module = ($_POST['Module_Code']);


//open database connection
$connection = mysql_connect ("xxxxxxxxxxxx.xx.xx.xx", "xxxxx", "xxxxxxx");


//select database
mysql_select_db ("ar1?db", $connection) or die ("Failed!");

echo "<Font face =\"Times\" color=\"Black\" size=\"6\"> <br> Comments Left for Module '$Module' <br>";

//Run Query on database
$result = mysql_query("Select * from evaluate2 WHERE Module_Code ='$Module'", $connection);

echo "<Font face =\"Times\" color=\"Black\" size=\"4\"> <br> What are the strong points of this module? <br>";

//loop over each row in the result set
while($row = mysql_fetch_row($result))
{
//print the values of the attributes
echo "<Font face =\"Times\" color=\"Black\" size=\"3\"> $row[3]<br><br>";
}
?>

</pre>

</td>
</tr>
</table>


If you can help me with this It would be appreciated.

I just want the infomation that is called using this script to be placed on top of a background that is being used throughout my webpage which is currently a .gif image.

I'm sure it cant be that hard to sort out.

Thanks

Magic