title: Trying to update profile from HTML form to MySQL using PHP
body: <p>I'm at this all day and have a feeling it may be something very simple.
  I am trying to give my users the option to update some of the entries in their user profile, without having to fill in everything everytime.</p>
  
  <p>I'll post my code below but basically I am getting NO response at the minute.</p>
  
  <p>My HTML form is as follows;</p>
  
  <pre><code>&lt;table width="500" border="0" cellpadding="3" cellspacing="1"&gt;
      &lt;tr&gt;
          &lt;form method="post" action="edit.php"&gt;
              &lt;div data-role="fieldcontain"&gt;
                  &lt;td width="200"&gt;Name:&lt;/td&gt;
                  &lt;td width="450"&gt;&lt;input type="text" name="inputName" value="" /&gt; &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td width="200"&gt;Password:&lt;/td&gt;
          &lt;td width="450"&gt;&lt;input type="password" name="inputPassword" value="" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td width="200"&gt;Date of Birth:&lt;/td&gt;
          &lt;td width="450"&gt;&lt;input type="date" name="inputDOB" value="" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td width="200"&gt;Core Competencies:&lt;/td&gt;
          &lt;td width="450"&gt;
              &lt;input type="checkbox" name="coreComp[]" value="Honesty" /&gt;Honesty&lt;br /&gt;
              &lt;input type="checkbox" name="coreComp[]" value="Loyalty" /&gt;Loyalty&lt;br /&gt;
              &lt;input type="checkbox" name="coreComp[]" value="Trust" /&gt;Trust&lt;br /&gt;
              &lt;input type="checkbox" name="coreComp[]" value="Empathy" /&gt;Empathy&lt;br /&gt;
              &lt;input type="checkbox" name="coreComp[]" value="Respect" /&gt;Respect&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td colspan="2"&gt;
              &lt;button data-theme="b" id="submit" type="submit"&gt;Submit&lt;/button&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td colspan="2"&gt;
              &lt;h3 id="notification"&gt;&lt;/h3&gt;
          &lt;/td&gt;
          &lt;/div&gt;
          &lt;/form&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>And my PHP currently looks like this;</p>
  
  <pre><code>&lt;?php
  
  session_start();
  include 'includes/Connect.php';
  
  $name = $_POST['inputName'];
  $password = $_POST['inputPassword'];
  $dob = $_POST['inputDOB'];
  $aCC = implode( ',' , $_POST['coreComp'] );
  
  $encrypt_password=md5($password);
  $username=$_SESSION['myusername'];
  
  if(!empty($name))
  {
      mysql_query("UPDATE Profile SET `Name`='$name' WHERE Username='$username'" or die(mysql_error());
                  echo("You have successfully updated your Name");
  }
  if(!empty($password))
  {
      mysql_query("UPDATE Profile SET Password='$encrypt_password' WHERE Username='$username'" or die(mysql_error());
                  echo("You have successfully updated your Password");
  }
  if(!empty($dob))
  {
      mysql_query("UPDATE Profile SET DOB='$dob' WHERE Username='$username'" or die(mysql_error());
                  echo("You have successfully updated your Date of Birth");
  }
  if(!empty($aCC))
  {
      mysql_query("UPDATE Profile SET CC='$aCC' WHERE Username='$username'" or die(mysql_error());
                  echo("You have successfully updated your Core Values");
  }
  
     mysql_close(); 
  
  ?&gt;
  </code></pre>