problems posting twice to same page using PHP_SELF... is this possible?
<p>im having a problem with php yet again... i've created a page with multiple forms on it and when i test it i've learnt that the first form is processed (with the ongoing, complete and reject) values but then i cant seem to process the 2nd form the same way. what could be the matter?</p>

<p>any help would be appreciated... happy new year to all the users of the site!</p>

<pre><code>   &lt;? 

    if (array_key_exists('complete',$_POST)) {
                echo "Sucess!";
                exit;
                };

    ?&gt;

            &lt;?php   

    $days = range (01, 31);
    $months = range (1, 12);
    $y1 = date("Y")-2;
    $y2 = date("Y");
    $years = range ($y1, $y2);

    if (array_key_exists('caseStatus',$_POST)) {
                    $case = $_POST['case'];

    if ($case == 'complete')
    { 
    echo 'Please set the date on which the case was &lt;b&gt;completed&lt;/b&gt;.&lt;p&gt;';
    echo "&lt;form action='" . $_SERVER['PHP_SELF'] . "' method='post'&gt;"; 
    echo '&lt;select name="completeDay"&gt;';
    foreach (range(1, 31) as $day) {
        echo '&lt;option value="'.sprintf("%02d", $day).'"&gt;'.sprintf("%02d", $day).'&lt;/option&gt;';
    }   echo '&lt;/select&gt;';
    echo '&lt;select name="completeMon"&gt;';
    foreach (range(1, 12) as $month) {
        echo '&lt;option value="'.sprintf("%02d", $month).'"&gt;'.sprintf("%02d", $month).'&lt;/option&gt;';
    }   echo '&lt;/select&gt;';
    echo '&lt;select name="completeYr"&gt;';
    foreach ($years as $value) {
        echo '&lt;option value="'.$value.'"&gt;'.$value.'&lt;/option&gt;';
    }   echo '&lt;/select&gt;
    &lt;p&gt;
    &lt;input type="hidden" name="complete" value="1"/&gt; 
    &lt;input name="submit" type="submit" value="Save"/&gt; 
    &lt;input type="button" value="Cancel" onclick="window.location=\'\'"/&gt;
    &lt;/form&gt;
    '; 
    exit;
    } 
&lt;form method="POST" action="&lt;?php echo $_SERVER['PHP_SELF'] . '?id=' . intval($client_id); ?&gt;"&gt;
    &lt;select name="case" class="rta"&gt;
      &lt;option value="&lt;?php echo $row_caseStatus['progress']; ?&gt;" selected="selected"&gt;&lt;?php echo $row_caseStatus['progress']; ?&gt;&lt;/option&gt;
      &lt;option value=""&gt;&lt;/option&gt;
      &lt;option value="ongoing"&gt;ongoing&lt;/option&gt;
      &lt;option value="complete"&gt;complete&lt;/option&gt;
      &lt;option value="reject"&gt;reject&lt;/option&gt;
      &lt;/select&gt;
    &lt;input type="submit" name="caseStatus" id="caseStatus" value="Save" /&gt;
                                    &lt;input type="hidden" name="caseStatus" value="1"/&gt; 
    &lt;br /&gt;
  &lt;/form&gt;
</code></pre>
