Hi all i want to use the value of color from database in coloring the name value but i do not know how to do it. could any one show me how i can achive this task.Thanks
i tried this and gives me syntax erro
echo("<tr><td><font color="#FF00FF">$Name</font></td>
furthermore i want to replace #FF00FF with value color from db.
PHP Code:<?
require("util.php");
$sql = new MySQL_class;
$sql->Create("color");
#
# Selecting Multiple Rows
#
echo("<html>");
echo("<head>");
echo("<p><ul><table border=1 cellpadding=4>\n");
echo("<tr><th>Name</th> > <th> color </th> </tr>\n");
$sql->Query("Select Name,color from NameColor");
for ($i = 0; $i < $sql->rows; $i++) {
$sql->Fetch($i);
$Name = $sql->data[0];
$color = $sql->data[1];
echo("<tr><td>$Name</td> <td>$color</td> \n");
#echo("<tr><td><font color="#FF00FF">$Name</font></td> <td>$color</td> \n"); ==> error here
}
echo("</table>\n");
echo("</body>");
echo("</html>");
?>


Reply With Quote
