Jump to content

color pallet in php


redarrow

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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.