I know this might look like a duplicate question. Have had a look at different question and answers, but struggle to get result. So basically my edit profile is working great, before i decide to had more field and still field somehow causing problem. so am getting this error
Fatal error: Call to a member function bind_param() on boolean.
Am going to show you my php code below
       <?php
    // start session
    session_start();
    error_reporting(E_ALL); ini_set('display_errors', 1);
    // i user is not log in redirect back to index
    if(!isset($_SESSION['user_type'])){
      header('Location: index.php');
    }
    // include data based connection config
    include_once('include/connection.php');
    // incluude header ttile page
    $title  = "Edit User Profile";
    // set user session variables
    $userId = $_SESSION['user_id'];
    //$userName = $_SESSION['user_name'];
    $temp = $_SESSION['user_name'];
    // if user update the data
      if(isset($_POST['update'])){                  
                ///////////////////// USER PROFILE IMAGE
                 // instantiate user profile image
            $Destination = 'userfiles/avatars';
            if(!isset($_FILES['ImageFile']) || !is_uploaded_file($_FILES['ImageFile']['tmp_name'])){
                $NewImageName = 'default.png';
                move_uploaded_file($_FILES['ImageFile']['tmp_name'], "$Destination/$NewImageName");
            }
            else{
                $RandomNum   = rand(0, 9999999999);
                $ImageName = str_replace(' ','-',strtolower($_FILES['ImageFile']['name']));
                $ImageType = $_FILES['ImageFile']['type'];
                $ImageExt = substr($ImageName, strrpos($ImageName, '.'));
                $ImageExt = str_replace('.','',$ImageExt);
                $ImageName = preg_replace("/\.[^.\s]{3,4}$/", "", $ImageName);
                $NewImageName = $ImageName.'-'.$RandomNum.'.'.$ImageExt;
                move_uploaded_file($_FILES['ImageFile']['tmp_name'], "$Destination/$NewImageName");
            }
        /***** Multiple query ******/
                    $firstname = trim($_POST['firstname']);
                    $lastname = trim($_POST['lastname']);
                    $email = trim($_POST['email']);
                    $user_name = trim($_POST['user_name']);
                    $profession = trim($_POST['profession']);
                    $phone = trim($_POST['phone']);
                        $postcode = trim($_POST['postcode']);
                    $address = trim($_POST['address']);
                    $bio = trim($_POST['bio']);  
                    $dob = trim($_POST['dob']);
                    $gender = trim($_POST['gender']);
                    $country = trim($_POST['country']);
    if(!($stmt = $con->prepare("SELECT * FROM user WHERE user_name = ?"))){
        die("Prepare failed: (" . $con->errno . ") " . $con->error);
    } 
    if(!$stmt->bind_param('s', $temp)){
        die("Binding parameters failed: (" . $stmt->errno . ") " . $stmt->error);
    }
    if($stmt->execute()){
        $stmt->store_result();
        $num_rows = $stmt->num_rows;
        $stmt->close();
        if($num_rows){
            if(!empty($_FILES['ImageFile']['name'])){
                if(!($stmt = $con->prepare("UPDATE user SET avatar = ? WHERE user_name = ?"))){
                    die("Prepare failed: (" . $con->errno . ") " . $con->error);
                } 
                if(!$stmt->bind_param('ss', $NewImageName, $temp)){
                    die("Binding parameters failed: (" . $stmt->errno . ") " . $stmt->error);
                }
                if($stmt->execute()){
                    $stmt->close();
                    header("location:edit-profile.php?user_name=" . $temp);
                    exit();
                }else{
                    die("Execute failed: (" . $stmt->errno . ") " . $stmt->error);
                }
            }
        }else{
            if(!($stmt = $con->prepare("INSERT INTO user (avatar) VALUES (?)"))){
                die("Prepare failed: (" . $con->errno . ") " . $con->error);
            } 
            if(!$stmt->bind_param('s', $NewImageName)){
                die("Binding parameters failed: (" . $stmt->errno . ") " . $stmt->error);
            } 
            if($stmt->execute()){
                $stmt->close();
                header("location:edit-profile.php?user_name=" . $temp);
                exit();
            }else{
                die("Execute failed: (" . $stmt->errno . ") " . $stmt->error);
            }
        }
    }else{
        die("Execute failed: (" . $stmt->errno . ") " . $stmt->error);
    }
  // ************* UPDATE PROFILE INFORMATION ************************//
  if(!($stmt = $con->prepare("UPDATE user SET firstname = ?, lastname = ?, skills = ?, profession = ?, 
  user_name = ?, phone = ?, address = ?, email = ?, bio = ?,
  gender = ?, dob = ?, country = ? WHERE id = ?"))) {
      echo "Prepare failed: (" . $con->errno . ")" . $con->error;
  }
  if(!$stmt->bind_param('sssssissssssi', $firstname, $lastname, $skills, $profession, 
                        $user_name, $phone, $address, $email, $bio, 
                        $gender, $dob, $country, $userId)){
    echo "Binding paramaters failed:(" . $stmt->errno . ")" . $stmt->error;
          }
  if(!$stmt->execute()){
           echo "Execute failed: (" . $stmt->errno .")" . $stmt->error;
          }
          if($stmt) {
              $_SESSION['main_notice'] = "Successfully Updated!";
                           header('Location: profile.php');
                              exit;
          }else{
                  $_SESSION['main_notice'] = "Some error, try again";
                  header('Location: '.$_SERVER['PHP_SELF']);
              }
   $stmt->close();
} // }
    //mysqli_close($con);
            ?>
            <?php
              //include header layout
                require_once('include/header.php');
              ?>
            <!--------------------------- Redirect based on user type ----------------------->
              <?php
                  if($_SESSION['user_type'] == 'admin' || $_SESSION['user_type'] == 'leader'){
                        // include admin header layout
                      require_once('include/admin-header.php');
                      }elseif($_SESSION['user_type'] == 'member'){
                       // include  member header layout
                      include_once('include/member-header.php');
                      }else{    
                        session_destroy();
                        header('Location: index.php');
                      }
            ?>
            <!--  check if userId is found, if not throw error ---->
              <?php 
     $stmt = $con->prepare("SELECT firstname, lastname, skills, user_name, avatar, profession, email, dob, gender, country, phone, bio, address, created_at FROM user WHERE id = ?");
    $stmt->bind_param('s', $userId);
    $stmt->execute();
    $stmt->store_result();  
    if($stmt->num_rows == 0) {  
        echo 'No Data Found for this user';
    }else {
        $stmt->bind_result($firstname, $lastname, $skills, $user_name, $avatar, $profession, $email, $dob, $gender, $country, $phone, $bio, $address, $created_at);
        $stmt->fetch();
      $stmt->close();
    }
                ?>
And here is my HTML code.
                            <form name="update" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data" id="UploadForm">
                  <table>
                        <label for="">Avatar</label>
                        <input name="ImageFile" type="file" id="uploadFile"/>
    <!--                     <div>
                            <div class="shortpreview">
                                <label for="">Previous Avatar </label>
                                <br> 
                                <img src="userfiles/avatars/<?php //echo $avatar;?>" width='150' height='150' >
                            </div>
                        </div> -->
                        <div class="col-md-6">
                            <div class="shortpreview" id="uploadImagePreview">
                                <label for="">Current Uploaded Avatar </label>
                                <br> 
                                <div id="imagePreview"></div>
                            </div>
                        </div>
                     </table>
                              <table>
                              <tr>
                                <td></td>
                                <td></td>
                                <td>Update</td>
                              </tr>
                              <tr>
                              <td><label for = "">First Name</label></td>
                              <td><input type="text" id="firstname" name="firstname" value="<?php echo $firstname; ?>"></td>
                              </tr>
                              <tr>
                              <td><label for = "">Last Name</label></td>
                              <td><input type="text" id="lastname" name="lastname"  value ="<?php echo $lastname; ?>"></td>
                              </tr>
                              <tr>
                              <td><label for = "">Postcode</label></td>
                              <td><input type="postcode" id="postcode" name="postcode" value="<?php echo $postcode; ?>"></td>
                              </tr>
                              <tr>
                              <td><label for = "">User Nmae</label></td>
                              <td><input type="user_name" id="user_name" name="user_name" value="<?php echo $user_name; ?>"></td>
                              </tr>
                              <tr>
                              <td><label for = "">Profession Name</label></td>
                              <td><input type="text" id="profession" name="profession" value="<?php echo $profession; ?>"></td>
                              </tr>                            
                              <tr>
                              <td><label for = "">Phone</label></td>
                              <td><input type="text" id="phone" name="phone" value="<?php echo $phone; ?>"></td>
                              </tr>                           
                               <tr>
                              <td><label for = "">Email</label></td>
                              <td><input type="text" id="email" name="email" value="<?php echo $email; ?>"></td>
                              </tr>
                              <tr>
                              <td><label for = "">Gender</label></td>
                              <td><input type="text" id="gender" name="gender" value="<?php echo $gender; ?>"></td>
                              </tr>
                              <tr>
                              <td><label for = "">Date Of Birth</label></td>
                              <td><input type="text" id="dob" name="dob" value="<?php echo $dob; ?>"></td>
                              </tr>
                              <tr>
                              <td><label for = "">Addres</label></td>
                              <td><input type="text" id="address" name="address" value="<?php echo $address; ?>"></td>
                                </tr>
                              <tr>
                              <td><label for = "">Country</label></td>
                              <td><input type="text" id="country" name="country" value="<?php echo $country; ?>"></td>
                              </tr>  
                              <tr>
                              <td><label for = "">Bio</label></td>
                              <td><input type="text" id="bio" name="bio" value="<?php echo $bio; ?>"></td>
                              </tr>
                              <tr>
                              <td></td>             
                              <td><input type="submit" id="update" name="update" value="Update"></td>
                              </tr>
                              </table>
                            </form>     
                        </div>
What notice when i take out the $postcode field i just added it works fine, which left me baffled on what the problem is. As have mention earler have had a through the previous questions and answer no luck. 
 
    