sticky form data problem php
<p>Trying out some things with php and html, I'm having issues trying to get all of my form data reposted. I've figured out how to do the text boxes. Still at a loss for the select box, radio and check box. Would I be better off reposting inside the HTML page or letting my include template code take care of it?</p>

<pre><code> &lt;html&gt;
&lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
    &lt;link rel="stylesheet" type="text/css" href="css/rocks.css"&gt;
    &lt;title&gt;About Us-- Rocks&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt; 
  &lt;?php include("templates/banner_navigation.php"); ?&gt;
  &lt;div id="links_group"&gt;
  &lt;?php include("templates/menu.php"); ?&gt; &lt;!-- 1st include for navigation, stored in templates  --&gt;
  &lt;/div&gt;
   &lt;div id="about_us_form"&gt;
       &lt;?php include("templates/about_us_valid.php"); ?&gt;
       &lt;form action="&lt;?php echo $PHP_SELF;?&gt;" method="post"&gt;
       &lt;table&gt;
       &lt;tr&gt;&lt;td&gt;First name:&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="contact_name" title="Enter your first name here" value="&lt;?php if (isset($_POST['contact_name'])) echo $_POST['contact_name']; ?&gt;" /&gt;&lt;/td&gt;&lt;/tr&gt;
       &lt;tr&gt;&lt;td&gt;Email Address:&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="contact_email" title="Enter your email here" value="&lt;?php if (isset($_POST['contact_email'])) echo $_POST['contact_email']; ?&gt;" &gt;&lt;/td&gt;&lt;/tr&gt;
       &lt;tr&gt;&lt;td&gt;Phone Number:&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="contact_phone_number" title="555-555-5555" value="&lt;?php if (isset($_POST['contact_phone_number'])) echo $_POST['contact_phone_number']; ?&gt;" /&gt;&lt;/td&gt;&lt;/tr&gt;
       &lt;tr&gt;&lt;td&gt;I prefer to be contacted by:&lt;/td&gt;&lt;td&gt;&lt;input type="radio" name="preference" value="Email" checked/&gt;Email&lt;input type="radio" name="preference" value="Phone" /&gt;Phone&lt;/td&gt;&lt;/tr&gt;
       &lt;tr&gt;&lt;td&gt;I am interested in:&lt;/td&gt; &lt;td&gt;&lt;select name="select_rocks"&gt;&lt;option value="gold"&gt;Gold&lt;/option&gt;
             &lt;option value="silver"&gt;Silver&lt;/option&gt;
             &lt;option value="thorium" selected="selected"&gt;Thorium&lt;/option&gt;
             &lt;option value="titanium"&gt;Titanium&lt;/option&gt;
             &lt;/select&gt;&lt;/td&gt;&lt;/tr&gt;
       &lt;tr&gt;&lt;td&gt;  I would like to ask about:&lt;/td&gt;&lt;/tr&gt;
       &lt;tr&gt;&lt;td&gt;&lt;textarea name="that_textarea" rows ="10" cols="25" title="Enter your questions here!"&gt;
       &lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;
       &lt;tr&gt;&lt;td&gt;I am also interested in:&lt;/td&gt;&lt;td&gt;
       &lt;tr&gt;&lt;td&gt;Gemstones &lt;input type="checkbox" name="checkbox1[]" value="gemstones" /&gt;&lt;/td&gt;&lt;tr&gt;
       &lt;tr&gt;&lt;td&gt;Ore processing &lt;input type="checkbox" name="checkbox1[]" value="oreprocessing" /&gt;&lt;/td&gt;&lt;/tr&gt;
       &lt;tr&gt;&lt;td&gt;&lt;input type="hidden" name="checkbox1[]" value="" /&gt; &lt;/td&gt;&lt;tr&gt;

       &lt;tr&gt;&lt;td&gt;&lt;input type="submit" value="submit" name="submitform" /&gt;&lt;/td&gt;&lt;/tr&gt;

       &lt;/table&gt;&lt;br/&gt;
       &lt;/form&gt;

  &lt;/div&gt;
&lt;/body&gt;
</code></pre>

<p></p>

<p>the include template:</p>

<pre><code>   &lt;?php
   function check_for_cat($namecheck=false,$emailcheck=false){
       if ($namecheck) $name_field_error = "(((Name Invalid!)))";
       if ($emailcheck) $email_field_error = "(((Email Invalid!)))";
       //Start of form
       if($namecheck) echo "&lt;tr&gt;&lt;td&gt;$name_field_error&lt;/td&gt;&lt;/tr&gt;";
       if($emailcheck) echo "&lt;tr&gt;&lt;td&gt;$email_field_error&lt;/td&gt;&lt;/tr&gt;";

   }

       if (!isset($_POST['submitform'])) {
       check_for_cat();
       } else {
          $namecheck = false;
          $emailcheck = false;


          $contact_name = isset($_POST['contact_name']) ? trim($_POST['contact_name'])  : '';
          $contact_email = isset($_POST['contact_email']) ? trim($_POST['contact_email'])  : '';
       if (strlen($contact_name)&lt;3)  $namecheck = true;
       if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $contact_email)) $emailcheck=true;
       if ($namecheck || $emailcheck ){
       check_for_cat($namecheck,$emailcheck);

       } else {
       echo '(((OMG the form is submitted!)))';
   }
}
   ?&gt;
</code></pre>

<p>Its probably pretty easy to do, I've just been looking at the code for too long, Thanks for the help! If possible put some code up, google and yahoo haven't found me much to look at.</p>
