43 lines
1.4 KiB
PHP
43 lines
1.4 KiB
PHP
<?php
|
|
if (isset($_POST['font_size']) && isset($_POST['font_color'])) {
|
|
setcookie('fontsize', $_POST['font_size']);
|
|
setcookie('fontcolor', $_POST['font_color']);
|
|
$message = "Your settings have beens set!";
|
|
}
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Customize Your Settings</title>
|
|
</head>
|
|
|
|
<body>
|
|
<?php
|
|
if (isset($message)) {
|
|
echo $message;
|
|
}
|
|
?>
|
|
<p>Use this form to customize your settings:</p>
|
|
<form action="customize.php" method="post">
|
|
<select name="font_size">
|
|
<option selected value="">Font Size</option>
|
|
<option value="xl">Extra Large</option>
|
|
<option value="l">Large</option>
|
|
<option value="m">Medium</option>
|
|
<option value="s">Small</option>
|
|
<option value="xs">Extra Small</option>
|
|
</select>
|
|
<select name="font_color">
|
|
<option selected value="">Font Color</option>
|
|
<option value="black">Black</option>
|
|
<option value="red">Red</option>
|
|
<option value="blue">Blue</option>
|
|
</select>
|
|
<input type="submit" name="submit" value="Set my preferences">
|
|
</form>
|
|
</body>
|
|
</html>
|