Exemplo n.º 1
0
 public static function update($user_id, $info)
 {
     if (!($mysqli = UsersInfoDB::connect())) {
         return false;
     }
     $query_sql = "  UPDATE\n                            users_info\n                        SET                            \n                            user_fname = ?,\n                            user_lname = ?,\n                            user_mobile = ?,\n                            user_gender = ?,\n                            user_birthdate = ?,\n                            user_marital = ?,\n                            user_about = ?\n                        WHERE\n                            user_id = ?";
     $query = $mysqli->prepare($query_sql);
     $query->bind_param("ssssssss", $info[Users::FNAME_KEY], $info[Users::LNAME_KEY], $info[Users::MOBILE_KEY], $info[Users::GENDER_KEY], $info[Users::BIRTHDATE_KEY], $info[Users::MARITAL_KEY], $info[Users::ABOUT_KEY], $user_id);
     $query->execute();
     $query->close();
     $mysqli->close();
     return $info;
 }