Changing a damn font in PHP

windows

Guest
whenever I try to change a font in php it gives me some stupid error :/

I am using the code,

<?php
session_start();
$db = mysql_connect("localhost", "username", "password");

mysql_select_db("nuozek",$db);

$result = mysql_query("SELECT * FROM simplecount", $db);

if ($myrow = mysql_fetch_array($result)) {

{
echo "<b>Unique hits: </b>";
printf($myrow["count"]);

echo "<br>";

echo "<b>Total hits: </b>";
printf($myrow["count_total"]);

echo "<br>";

} ($myrow = mysql_fetch_array($result));

}

?>

which works fine, but whenever I try to change the font to verdana it complains, if I echo the tags it stops working completely, and if I add all the information at the top, it still works but gives some big error about sessions.. is there an easy way around it?

Thanks.be SURE you escape the quotes!!
echo "<font face=\"verdana\">";
// stuff for different font
echo "</font>";don't you know there is a damn php forum :P

anyway I don't see where you are changing the font?Well, you cannot echo anything before session_start();. try this:


<?
session_start();
?>
<FONT>
<?
$db = mysql_connect("localhost", "username", "password");

mysql_select_db("nuozek",$db);

$result = mysql_query("SELECT * FROM simplecount", $db);

if ($myrow = mysql_fetch_array($result)) {

{
echo "<b>Unique hits: </b>";
printf($myrow["count"]);

echo "<br>";

echo "<b>Total hits: </b>";
printf($myrow["count_total"]);

echo "<br>";

} ($myrow = mysql_fetch_array($result));

}

?></FONT>
 
Back
Top