$_POST not working in php
<p>I am new here and I have a question. I have a problem that I can't figure it out with _POST. I have been searching for hours before start writing! As far as I can see I haven't done any of the mistakes that are posted for other similar question (form action..., name attribute...,etc). Please, can you check my code below to tell me what am I doing wrong??</p>

<p>I use xampp 1.7.3 on windows 7.</p>

<hr>

<pre><code>&lt;?php require("includes/header.php"); ?&gt;
&lt;?php require_once("includes/connection.php"); ?&gt;
&lt;?php require_once("includes/functions.php"); ?&gt;&lt;head&gt;
&lt;script type="text/javascript"&gt;

function theChecker()
{
 if(document.getElementById('checker').checked){
     document.getElementById('submitter').disabled=false;
 }
 else{
     document.getElementById('submitter').disabled=true;
 }
}
&lt;/script&gt;

&lt;/head&gt;

&lt;?php require("includes/body_no_menus.php"); ?&gt;

&lt;div align="center"&gt;
&lt;form name="signup" method="post" action="&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;"&gt;

 &lt;?php

 echo "&lt;hr/&gt;
&lt;table width='600' border='0'&gt;
  &lt;tr&gt;
    &lt;td width='237'&gt;Κωδικός οικοδομής&lt;/td&gt;
    &lt;td width='351'&gt;&lt;input name='building_id' type='text' id='building_id' size='30' maxlength='40' /&gt;*&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Κωδικός διαμερίσματος&lt;/td&gt;
    &lt;td&gt;&lt;input name='apartment_id' type='text' id='apartment_id' size='30' maxlength='40' /&gt;*&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;/td&gt;
    &lt;td height='31' colspan='2' &gt;&lt;label&gt;
     &lt;input name='send' type='submit' value='Αποστολή' /&gt;
    &lt;/label&gt;&lt;/td&gt;
    &lt;/tr&gt;

&lt;/table&gt;
";
?&gt;
&lt;/form&gt;
&lt;/div&gt;


&lt;p&gt;

&lt;?php 

if(isset($_POST['send'])) {
 // Check input / Required fields
 $building_id = check_input($_POST['building_id'],"Εισάγετε τον κωδικό της οικοδομής!");
 $apartment_id = check_input($_POST['apartment_id'],"Εισάγετε όνομα χρήστη!");

 $query = "SELECT  idTENANT,FNAME,LNAME,BUILDING_ADMIN,PHONE FROM TENANT,APARTMENT, BUILDING
    WHERE  TENANT.APARTMENT_ID = APARTMENT.idAPARTMENT
    AND    APARTMENT.BUILDING_ID = BUILDING.idBUILDING
    AND  idAPARTMENT = '$apartment_id'
    AND  idBUILDING = '$building_id'";
 $result=mysql_query($query) or die ("Couldn't execute query.");
 $row = mysql_fetch_array( $result );  

 $id = $row['idTENANT'];
 $fname = $row['FNAME'];
 $lname = $row['LNAME'];
 $apartment = $row['APARTMENT_ID'];
 $phone = $row['PHONE'];
 if($row['BUILDING_ADMIN'] == 0)
  $admin = "ΟΧΙ";
 else
  $admin = "ΝΑΙ";
echo " &lt;hr /&gt;
&lt;table width='300' border='0'&gt;
    &lt;tr&gt;     
     &lt;td&gt;Όνομα&lt;/td&gt;           
  &lt;td&gt;$fname&lt;/td&gt;   
 &lt;/tr&gt;
    &lt;tr&gt;     
  &lt;td&gt;Επίθετο&lt;/td&gt;          
  &lt;td&gt;$lname&lt;/td&gt;   
 &lt;/tr&gt;
    &lt;tr&gt;     
     &lt;td&gt;Όνομα χρήστη&lt;/td&gt;        
     &lt;td&gt;&lt;input name='username' type='text' size='30' maxlength='20' /&gt;*&lt;/td&gt;   
    &lt;/tr&gt;
    &lt;tr&gt;     
  &lt;td&gt;Κωδικός χρήστη&lt;/td&gt;      
  &lt;td&gt;&lt;input name='password' type='password' size='30' maxlength='20'/&gt;*&lt;/td&gt;   
 &lt;/tr&gt;
    &lt;tr&gt;     
  &lt;td&gt;Επαλήθευση κωδικού&lt;/td&gt;    
  &lt;td&gt;&lt;input name='verify_password' type='password' size='30' maxlength='40'/&gt; *&lt;/td&gt; 
 &lt;/tr&gt;
    &lt;tr&gt;     
  &lt;td&gt;Διαχείριση οικοδομής&lt;/td&gt;  
  &lt;td&gt;$admin&lt;/td&gt;   
 &lt;/tr&gt;
    &lt;tr&gt;     
  &lt;td&gt;Τηλέφωνο&lt;/td&gt;            
  &lt;td&gt;$phone&lt;/td&gt;   &lt;/tr&gt;

    &lt;tr&gt;   
  &lt;td&gt;&lt;/td&gt;
  &lt;td&gt;&lt;input name='checkterms' type='checkbox' id='checker' onclick='theChecker()' value='Ναι'/&gt;
    &lt;label&gt;Έχω διαβάσει και αποδέχομαι τους όρους χρήσης.&lt;/label&gt; *&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;&lt;/td&gt;
     &lt;td&gt;&lt;input type='submit' name='complete'  id='submitter' value='Ολοκλήρωση εγγραφής' disabled/&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
";
}

if(isset($_POST['complete'])) {
 // Password match
 if ($password != $verify_password)
 {
   echo '&lt;font color="red"&gt;Οι κωδικοί δεν ταιριάζουν&lt;/font&gt;';
 }//if
 else 
 { 
  // Execute MySQL commands
  $query = "UPDATE TENANT SET USERNAME = '$un', PASSWD='$pw' WHERE idTENANT='$id'";
  $result=mysql_query($query) or die ("Couldn't execute query.");
  header("Location: main_login.php");
 }//else
}//if
?&gt;

&lt;/p&gt;
&lt;?php require("includes/footer.php"); ?&gt;
</code></pre>

<hr>

<p>The first _POST (if(isset($_POST['send']))...) works perfectly. But if(isset($_POST['complete'])) {... does nothing. I ve tried to echo some data to see if my connection doesn't work, but its the _POST...</p>

<p>Please help me!!!!</p>

<p>Thanks for your time!</p>
