Hallo,
ich habe eine Frage ich möchte mit PHP ein Farbwahl Script einbauen. Gestartet wird die main.php
---
<?php
session_start();
if (!isset ($_SESSION['colorset']))
{
$bg = "red";
$text = "white";
$link = "#C0C0C0";
$vlink = "#808080";
$alink = "#FFFFFF";
}
else
{
$colorset = $_SESSION['colorset'];
if ($colorset=="bw")
{
$bg = "black";
$text = "white";
$link = "#C0C0C0";
$vlink = "#808080";
$alink = "#FFFFFF";
}
if ($colorset=="wb")
{
$bg = "white";
$text = "black";
$link="#3333FF" ;
$vlink="#99CCFF";
$alink="#c0c0c0";
}
}
?>
<html>
<head>
</head>
<body bgcolor="<?= $bg ?>" text="<?= $text ?>" link="<?= $link ?>" vlink="<?= $vlink ?>" alink="<?= $alink ?>">
Herzlich willkommen...
<br><br>
<a href="setcolor.php">Zur Farbauswahl</a>
--
Über das Formular auf setcolor.php soll man die Farben ändern können.
--
<?php
session_start();
session_register('colorset');
?>
<html>
<head>
</head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>Login</title>
</head>
<body>
<form name="colorset" method="post" action="main.php">
<select size="1" name="colorset">
<option value="bw">Schwarz / Weiß</option>
<option value="wb">Weiß / Schwarz</option>
<option selected>Bitte Farbschema wählen</option>
</select>
<br><br>
<br><br>
<input type="submit" value="OK">
<input type="reset" value="Reset">
</form>
</body>
</html>
--
Jemand eine Idee warum es nicht funktioniert?
Danke für eure Tipps.