ok... this is what im trying to do... use config.php to change the font/background color...this is what i have for config.php
<?php
mysql_connect(localhost,triggerh_maps,maps);
mysql_select_db(triggerh_THCSTATS);
$bg = "ffffff"; // Background color ONLY numbers, do NOT put the #
$fc = "000000"; //Font color, ONLY numbers! do NOT put the #
?>
and in layout1.php(just for the font and bg color)
<body bgcolor="<?php echo $bg; ?>">
<font color="<?php echo $fc?>">
its... not working:S
thx for any help
font color/background color with config.php
Moderator: General Moderators
well i need that db stuff for the other content on the layout1.php...
here is the rest of layout1.php
<body bgcolor="#<?php echo $bg; ?>" link="#<?php echo $fc ?>" vlink="#<?php echo $fc ?>">
<?php
include('config.php');
$id = $_GET['id']; // Put this somewhere above the declaration of $result
$result = mysql_query("select * from maps where id='$id'");
if ($result)
{
$row = mysql_fetch_array($result);
$name = $row["name"];
$mname = $row["mname"];
$dis = $row["discription"];
$dl = $row["dllink"];
}
else { }
?>
<font color="#<?php echo $fc ?>">
<center>
<table>
<tr>
<td>
<font color="#<?php echo $fc ?>">Map name:
</td>
<td>
<font color="#<?php echo $fc ?>"><?php print "$mname" ?>
</td>
</tr>
<tr>
<td>
<font color="#<?php echo $fc ?>">Map creator:
</td>
<td>
<font color="#<?php echo $fc ?>"><?php print "$name" ?>
</td>
</tr>
<tr>
<td>
<font color="#<?php echo $fc ?>">Download:
</td>
<td>
<font color="#<?php echo $fc ?>"><a href="<?php print $row['dllink']; ?>"><?php print $row['mname']; ?></a>
</td>
</tr>
</table>
</center>
still cant see the php printed stuff....
http://www.triggerhappycheaters.com/maps/layout1.php
here is the rest of layout1.php
<body bgcolor="#<?php echo $bg; ?>" link="#<?php echo $fc ?>" vlink="#<?php echo $fc ?>">
<?php
include('config.php');
$id = $_GET['id']; // Put this somewhere above the declaration of $result
$result = mysql_query("select * from maps where id='$id'");
if ($result)
{
$row = mysql_fetch_array($result);
$name = $row["name"];
$mname = $row["mname"];
$dis = $row["discription"];
$dl = $row["dllink"];
}
else { }
?>
<font color="#<?php echo $fc ?>">
<center>
<table>
<tr>
<td>
<font color="#<?php echo $fc ?>">Map name:
</td>
<td>
<font color="#<?php echo $fc ?>"><?php print "$mname" ?>
</td>
</tr>
<tr>
<td>
<font color="#<?php echo $fc ?>">Map creator:
</td>
<td>
<font color="#<?php echo $fc ?>"><?php print "$name" ?>
</td>
</tr>
<tr>
<td>
<font color="#<?php echo $fc ?>">Download:
</td>
<td>
<font color="#<?php echo $fc ?>"><a href="<?php print $row['dllink']; ?>"><?php print $row['mname']; ?></a>
</td>
</tr>
</table>
</center>
still cant see the php printed stuff....
http://www.triggerhappycheaters.com/maps/layout1.php
ohh! i see now!
you have to go to http://www.triggerhappycheaters.com/map ... 1.php?id=2
all i was forgeting was the #
you have to go to http://www.triggerhappycheaters.com/map ... 1.php?id=2
all i was forgeting was the #