scorpken
Legacy Member
Ik zou een script moeten hebben om via een databank de css stijl te laten kiezen. momenteel heb ik dit al:
kiezencss.php:
En
templates/default.php:
Iemand die me kan helpen?
Mvg
kiezencss.php:
PHP:
<?php
mysql_connect("localhost", "sam", "sam") or die(mysql_error());
mysql_select_db("cms") or die(mysql_error());
$query="SELECT * FROM links";
$result = mysql_query($query) or die (mysql_error());
?>
<center>
<form method="post" action="http://sam.rekencentra.be/">
<br />
<table width="396" border="1">
<tbody>
<tr>
<td bgcolor="#666666" align="center" colspan="4">
<h2><font color="white">Content CSS kiezen</font></h2>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td width="190">Content:</td>
<td width="190">
<?php
mysql_connect("localhost", "sam", "sam");
mysql_select_db("cms");
$query = "SELECT naam FROM css";
$result = mysql_query($query);
print "<SELECT name=content>";
while ($line = mysql_fetch_array($result))
{
foreach ($line as $value)
{
print "<OPTION value='$value'";
}
print ">$value</OPTION>";
}
print "</SELECT>";
?></td>
</tr>
<tr>
<td width="190">Bevestigen:</td>
<td width="190"><input type="submit" value="Bevestigen" />
</td>
</tr>
</tbody>
</table>
<p> </p>
</form>
</center>
En
templates/default.php:
PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" media="screen" href="css/content.css" />
<link rel="stylesheet" type="text/css" media="print" href="css/print.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Author" content="" />
<!-- BEGIN GENERAL -->
<meta name="Keywords" content="school" />
<meta name="Description" content="" />
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
<link rel="icon" href="img/favicon.ico" type="image/ico" />
<title>{TITLE}</title>
</head>
<body>
<div>
<img id="background" src="{BACKGROUND}" alt="" title="" />
</div>
<div id="page_header">
<img alt="" src="img/logo.gif" />
<div id="title">
{SCHOOLNAME}
<h2>{SCHOOLCOMMENT}</h2>
</div>
</div>
<div id="location">
U bevindt zich hier >> {LOCATION}
</div>
<div id="container">
<div id="navigation">
<ul>
{MENU} </ul>
</div>
<div id="content"><div>
<p>{PAGE_CONTENT}</p>
</div></div>
<div id="right">
{RIGHT_LOGIN}
{RIGHT_CONTEXT}
</div>
</div>
<div id="page_footer">
<a href="http://www.rekencentra.com">© 2007 B. Rekencentra NV</a>
</div>
<!-- END GENERAL -->
</body>
</html>
Iemand die me kan helpen?
Mvg



