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
asi0917
Forum Commoner
Posts: 41 Joined: Thu Nov 25, 2004 10:37 am
Location: Shoreline, Washington
Contact:
Post
by asi0917 » Tue Dec 07, 2004 2:26 pm
heres the code
Code: Select all
<html>
<?php
$color = $_REQUEST['color'];
echo ("<body bgcolor=" .$color. ">");
?>
</body>
</html>
i want to have the page bg be $color
i feel stupid...
how do i make there not be a parse error?
Last edited by
asi0917 on Tue Dec 07, 2004 2:30 pm, edited 1 time in total.
potsed
Forum Commoner
Posts: 50 Joined: Sat Oct 09, 2004 12:00 pm
Location: - South Africa
Post
by potsed » Tue Dec 07, 2004 2:30 pm
Code: Select all
<html>
<?php
$color = ($_REQUESTї'color']) ? '#'.$_REQUESTї'color'] : #FFF;
echo '<body style="background: '.$color.';">';
?>
</body>
</html>
asi0917
Forum Commoner
Posts: 41 Joined: Thu Nov 25, 2004 10:37 am
Location: Shoreline, Washington
Contact:
Post
by asi0917 » Tue Dec 07, 2004 2:31 pm
stalker xD
anyway thnx