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
Circle
Forum Newbie
Posts: 23 Joined: Thu Jan 19, 2006 7:11 am
Post
by Circle » Sat Jul 08, 2006 5:08 pm
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);
?>
Ollie Saunders
DevNet Master
Posts: 3179 Joined: Tue May 24, 2005 6:01 pm
Location: UK
Post
by Ollie Saunders » Sat Jul 08, 2006 5:18 pm
your question is about html not php. but i'm a nice guy:
you have to use pink otherwise your head explodes.
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Sat Jul 08, 2006 5:22 pm
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 » Sat Jul 08, 2006 6:14 pm
Yes, thanks a lot.
Ollie Saunders
DevNet Master
Posts: 3179 Joined: Tue May 24, 2005 6:01 pm
Location: UK
Post
by Ollie Saunders » Sat Jul 08, 2006 6:35 pm
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 » Sat Jul 08, 2006 8:25 pm
I'm not worried I'm working on it for someone else.
Ollie Saunders
DevNet Master
Posts: 3179 Joined: Tue May 24, 2005 6:01 pm
Location: UK
Post
by Ollie Saunders » Sat Jul 08, 2006 8:28 pm
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!!!
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 » Sat Jul 08, 2006 9:51 pm
Ollie Saunders
DevNet Master
Posts: 3179 Joined: Tue May 24, 2005 6:01 pm
Location: UK
Post
by Ollie Saunders » Sat Jul 08, 2006 9:55 pm
Yes!
Another life is saved!
*said raising arm defiantly to the skys*
I will sleep soundly tonight.