redarrow Posted August 17, 2006 Share Posted August 17, 2006 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 https://forums.phpfreaks.com/topic/17856-color-pallet-in-php/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.