Hallo,
vielen Dank für den Code.
Ich habe es mal in meinen eingebaut und das kommt raus.
PHP
<?php
$color = (isset($_GET['color'])) ? $_GET['color'] : 'black';
switch ($color)
{
case 'blue' : $color = '#330099'; break;
case 'green': $color = '#006633'; break;
case 'yellow': $color = '#FFCC00'; break;
case 'red' : $color = '#CC0000'; break;
default : $color = '#000000'; break;
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>jeu des couleurs</title>
<style type="text/css">
<!--
.style1 {color: <?php echo $color; ?>;}
.style3 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
}
-->
</style>
</head>
<body>
<table width="386" height="171" border="1" align="center">
<tr>
<td height="43" colspan="2"><div align="center" class="style3">Le jeu des couleurs</div></td>
</tr>
<tr>
<td width="64"><p align="center"><span class="style3"><a href='<?php echo $_SERVER['SCRIPT_NAME']; ?>?color=blue'>Bleu</a></span></p>
<p align="center" class="style3"> </p>
<p align="center" class="style3"><a href='<?php echo $_SERVER['SCRIPT_NAME']; ?>?color=green'>Vert</a></p>
<p align="center" class="style3"> </p>
<p align="center" class="style3"><a href='<?php echo $_SERVER['SCRIPT_NAME']; ?>?color=yellow'>Jaune</a></p>
<p align="center" class="style3"> </p>
<p align="center"><span class="style3"><a href='<?php echo $_SERVER['SCRIPT_NAME']; ?>?color=red'>Rouge</a></span></p></td>
<td width="264" color:<?php echo $color; ?>"><p align="center" class="style1"><strong><u>Le miroir</u></strong></p>
<p align="center" class="style1">Dans un miroir</p>
<p align="center" class="style1">Est né un oiseau</p>
<p align="center" class="style1">Un oiseau tout bleu</p>
<p align="center" class="style1">Avec des plumes vertes.</p>
<p align="center" class="style1">Un oiseau tout jaune</p>
<p align="center" class="style1">Avec des plumes rouges.</p>
<p align="center" class="style1">Un oiseau tout violet</p>
<p align="center" class="style1">Avec des plumes oranges.</p>
<p align="center" class="style1">Cet oiseau est né </p>
<p align="center" class="style1">Dans le miroir d'une mare</p>
<p align="center" class="style1">Où l'arc en ciel prenait son bain.</p>
<p align="right"><em> Michel Cordeobeufs </em></p></td>
</tr>
</table>
</body>
</html>
Alles anzeigen
Jetzt versuch ich mir den Kram mal zu erklären, dass ich irgendwie glaubhaft machen kann, dass ich das gemacht habe
Danke nochmal.