bg color

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Circle
Forum Newbie
Posts: 23
Joined: Thu Jan 19, 2006 7:11 am

bg color

Post by Circle »

Just a stupid question probably but I've been searching google and couldn't find anything I understand. I got a PHP page and want the change the color of the entire background to white is there any one that could tell me how to?

My code is:

Code: Select all

<?php 
$commentaar=$_POST["commentaar"];
$naam=$_POST["naam"];
$email=$_POST["email"];
echo "<TR><TD><CENTER><img src=\"images/top.jpg\"></CENTER></TD></TR>\n";
echo "<form action=\"$_SERVER[PHP_SELF]\" method=\"post\">\n";
echo "<p><font color='#FFFFFF'>Name : </font><input type=\"text\" name=\"naam\"></p>\n";
echo "<p>E-mail : <input type=\"text\" name=\"email\"></p>\n";
echo "<p>Message :</p>\n";
echo "<textarea cols=\"55\" rows=\"5\" wrap=\"soft\" name=\"commentaar\"></textarea><br>\n";
echo "<p><input type=\"submit\" value=\"Commentaar verzenden\"></p>\n";
echo "<hr>\n";
echo "<p><h2>User comments</h2></p>\n";

$tekstfile="commentaar.txt";
if(isset($commentaar)&&naam!=""&&email!=""){
$pointer=fopen($tekstfile, "r+");
$oudcommentaar=fread($pointer,filesize($tekstfile));
$email="<a href=\"mailto:$email\">$email</a>";
$date=date("j.n.Y");
$commentaar=htmlspecialchars($commentaar);
$commentaar=stripslashes(nl2br($commentaar));
    $geschreven="<p><strong>$naam</strong> ($email) heeft geschreven op <i>$date</i> :
    <br><br>$commentaar</p><hr>\n";
rewind($pointer);
fputs($pointer,"$geschreven\n$oudcommentaar\n");
}
readfile($tekstfile);
?>
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

your question is about html not php. but i'm a nice guy:

Code: Select all

<body bgcolor="pink">
you have to use pink otherwise your head explodes.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Compliance-wise, I would go with...

Code: Select all

<body style="background-color: #ffffff;">
<?php
//php stuff here
?>
</body>
Is that what you meant by the ebtire background being white?
Circle
Forum Newbie
Posts: 23
Joined: Thu Jan 19, 2006 7:11 am

Post by Circle »

Yes, thanks a lot.
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

You better use pink ya hear!
Don't say I didn't warn you
Circle
Forum Newbie
Posts: 23
Joined: Thu Jan 19, 2006 7:11 am

Post by Circle »

I'm not worried I'm working on it for someone else.
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

It makes no distinction. I've had visions today. Someone's gonna get hurt, they didn't use pink and now they're hurt.

*shudders*

The pain!
The pain!!!
User avatar
dull1554
Forum Regular
Posts: 680
Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W

Post by dull1554 »

lmfao........
i just changed the bg of all of my clients websites to pink, hot pink in fact.

:D :D :D :D :D :D :D :D
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

Yes!

Another life is saved!
*said raising arm defiantly to the skys*
I will sleep soundly tonight.
Post Reply