him
05-10-2003, 12:39 PM
if(isset($_POST[content])) {
extract($_POST);
$oldarray = fopen("$datafile", "r");
$oldcontents = fread($oldarray, filesize($datafile)) or die( 'Could not read from file.');
fclose($oldarray);
if(!$fp = fopen("$datafile", "w")){
die("Error: PHP Does Not Appear To Have Permission To Write To $datafile !");
}
fwrite ($fp, "Posted By: $name -- ");
fwrite ($fp, date("n/d/y h:i:s A"));
fwrite ($fp, "<br><b>Email:</b> <a href='mailto:$email'>$email</a><br>");
fwrite ($fp, "<b>Topic:</b> $title<br><br>");
fwrite ($fp, stripslashes($content) . "<br><hr noshade size=0><br>");
fwrite ($fp, $oldcontents);
fclose($fp);
header("Location: $_SERVER[PHP_SELF]");
}
?>
this is a guest book php script....i am new to php...(well...i have no knowledge at all..!) i just want to ask how to change the font colour in this script e.g Posted By....i want to change it with the color black, Verdana, and size 7pt..! i have tried to put <style> or <font> in there...but it stilll doesn't work..!
thanks for helping,
him
extract($_POST);
$oldarray = fopen("$datafile", "r");
$oldcontents = fread($oldarray, filesize($datafile)) or die( 'Could not read from file.');
fclose($oldarray);
if(!$fp = fopen("$datafile", "w")){
die("Error: PHP Does Not Appear To Have Permission To Write To $datafile !");
}
fwrite ($fp, "Posted By: $name -- ");
fwrite ($fp, date("n/d/y h:i:s A"));
fwrite ($fp, "<br><b>Email:</b> <a href='mailto:$email'>$email</a><br>");
fwrite ($fp, "<b>Topic:</b> $title<br><br>");
fwrite ($fp, stripslashes($content) . "<br><hr noshade size=0><br>");
fwrite ($fp, $oldcontents);
fclose($fp);
header("Location: $_SERVER[PHP_SELF]");
}
?>
this is a guest book php script....i am new to php...(well...i have no knowledge at all..!) i just want to ask how to change the font colour in this script e.g Posted By....i want to change it with the color black, Verdana, and size 7pt..! i have tried to put <style> or <font> in there...but it stilll doesn't work..!
thanks for helping,
him