0
<!DOCTYPE HTML>
<html>
<?php
$style=isset( $_GET['color'] ) ? $_GET['color'] : '';
$text=$_GET['text'];
?>

<head>
  <title>Test!</title>
  <style type="text/css">
  div { text-align:center; margin:0 auto; }
  </style>
</head>
<body>
<div>
<form action="index.php" method="GET">
<input type="text" name="text"><br>
<input type="radio" name="color" value="blue">Синий<br>
<input type="radio" name="color" value="red" >Красный<br>
<input type="radio" name="color" value="green">Зеленый<br>
<input type="radio" name="color" value="black">Черный<br>
<input type="radio" name="color" value="yellow">Желтый<br>
<input type="submit" >
</form>
</div>
<?php 
switch ($style)
{
case 'blue': $style ='style="color:blue'; break;
case 'red':$style = 'style="color:red'; break;
case 'green':$style='style="color:green'; break;
case 'black':$style='style="color:black'; break;
case 'yellow':$style='style="color:yellow'; break;
default:
}
?>
<div>


</div>

</body>
</html>
2
Contributors
1
Reply
21
Views
3 Years
Discussion Span
Last Post by diafol
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.