Jump to content

Archived

This topic is now archived and is closed to further replies.

redarrow

color pallet in php

Recommended Posts

I was trying to make a admin color pallet today you got any idears off an easy way cheers.

the code is hard to code as you can see the time its all done i have no fingers please help cheers.
[code]
<?php include("test.php")?>
<html>
<head>

<body>
<table  width="400" height="200" align="center">
<td align="center">
<h1><p class="dotted">web site test</p></h1>
</td>
</table>
</body>
</html>
[/code]

[code]
<?php
$db=mysql_connect("localhost","xx","xx");
mysql_select_db("color",$db);

$query="select * from color_pallet";

$result=mysql_query($query);

while($record=mysql_fetch_assoc($result)){
?>

<html>
<head>
<style type="text/css">
body {background-color: <?php echo $record['bground']; ?>}
h1 {color: <?php echo $record['h1']; ?>}
h2 {color:  <?php echo $record['h2']; ?>}
p {color: <?php echo $record['p']; ?>}
p.dotted {border-style: dotted}
TABLE { background: <?phpecho $record['table_bground'];?>; border-collapse: collapse }
TD{ background: <?php echo $record['table_td_color'];?>; border: double black }
</style>
</head>
</html>
<?}?>
[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.