hip1/11.7.php

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <?php setcookie('colour', $_COOKIE['colour'] = $_GET['colour']); ?> <style> body{ background-color: <?php echo $_COOKIE['colour']?> } </style> <p> <div><a href='11.7.php?colour=blue'>Blauw</a></div> <div><a href= '11.7.php?colour=red'>Rood</a></div> <div><a href= '11.7.php?colour=green'>Groen</a></div> <div><a href= '11.7.php?colour=pink'>Roze</a> </p> </body> </html>

Resultaat

Made by Thijs Aarnoudse