title: PHP Update query is being executed, but the credentials are not updated
body: <p>I have a form tag on my site that leads to the PHP page with email and/or/without description. Based on that the code generates a query, the query needs to update these credidentials. That part of the code works and has been tested. The problem is that the database is not updating the e-mail credidential, but if i put it to update the description it does so. The code has 3 checks, if the user puts only his email, if he puts only his description or puts both. Based on that the code works like this :</p>
  
  <pre><code>&lt;?php
  session_start();
  include_once 'connection.php';
  $id = $_SESSION['user_id'];
  if(isset($_POST['emailChange']) || isset($_POST['descChange'])){
         $desc = $_POST['descChange'];
         $email = $_POST['emailChange'];
         if(empty($email)){
             $query = "UPDATE users SET description = :descr WHERE user_id= :id ;";
             $stmt = $conn-&gt;prepare($query);
             $stmt-&gt;bindParam(":descr", $desc);
         } else if(empty($desc)){
             $query = "UPDATE users SET user_email= :email WHERE user_id= :id ;";
             $stmt = $conn-&gt;prepare($query);
             $stmt-&gt;bindParam(":email", $email);
         } else{
             $query = "UPDATE users SET description = :descr AND user_email = :email WHERE user_id= :id;";
             $stmt = $conn-&gt;prepare($query);
             $stmt-&gt;bindParam(":email", $email);
             $stmt-&gt;bindParam(":descr", $desc);
         }
         if(!filter_var($email, FILTER_VALIDATE_EMAIL)){
             header("Location: ../profile.php?error=invalidEmail");
             exit();
         }
             $stmt-&gt;bindParam(":id", $id);
             $stmt-&gt;execute();
     }
  </code></pre>
  
  <p>The form itself looks like this : </p>
  
  <pre><code> &lt;form action="assets/upload.php" method="POST"&gt;
       &lt;input type="text" name="emailChange" class="inputs" id="changeEmail" placeholder = "Enter your new E-mail"&gt;
       &lt;input type="text" name="descChange" class="inputs" id="changeDesc" placeholder="Enter your description"&gt;
       &lt;button type="submit" id="btnconfirmCreds" name="changeCreds"&gt;Confirm Changes&lt;/button&gt;
   &lt;/form&gt;
  
  </code></pre>
  
  <p>The names in the database looks like this :</p>
  
  <pre><code>[user_id][user_username][user_email][user_password][role_id][user_image][description][num_of_posts]
  
  </code></pre>