I am trying to pick up php and run into something i can not solve.
In a form i use a radio button with two options.
When an option is selected and i send the form, it doesn't give back anything.

This is the code i use:

<title>Test Calculation</title>
function valid_W ($str){ return (ereg ('^[0-9]{3,5}$' , $str));}
function valid_H ($str){ return (ereg ('^[0-9]{3,5}$' , $str));}
if ($submit != "Submit" || !valid_W($W) || !valid_H($H)) {
<h3>Test Calculation</h3>
<form id="test_calculation" name="test_calculation" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" >
   <label for="Type"> Type<br/>
    Type1<input type="radio" name="Type1" value="type" <?php if ($type == 'Type1') { echo "checked"; } ?>  /><br/>
    Type2<input type="radio" name="Typ2" value="type" <?php if ($type == 'Type2') { echo "checked"; } ?>  />
 <fieldset class="submit">
   <input type="reset" name="reset" value="Reset" />
   <input type="submit" name="submit" value="Submit" />

// in all other cases process the for,
} else {		  

// This function determens the type
function ShowType($type){
		 if ($type == 'Type1'){
			 $version = 1;			 
		 } else {
		     $version = 2;		   
		 return $version;

$ShowVersion = ShowType($type);
echo "The version is: " . ($ShowVersion) . "<br/><br />";

i remember the process was different from getting the value out of a checkbox.
it is just impossible for me to figure it out.

would you be so kind to tell me what is not right and how i should get it working with what code?

thanks so much in advance.

kind regards,