<!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>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.