prepare(" SELECT company_id, channel_name, company_name, company_name2, company_logo, company_seal, branch, branch_no, fiscal_year, fx, address, address2, tax_id, prompt_pay, entrepreneur, email, phone, fax, website, facebook_page FROM company_list WHERE company_id = :company_id LIMIT 1 "); $sth->execute([':company_id' => $company_id]); db_check($sth, $answer); $company = $sth->fetch(PDO::FETCH_ASSOC); if (!$company) { $answer['message'] = 'Company not found.'; http_response_code(404); exit(json_encode($answer)); } $answer['success'] = 1; $answer['output'] = $company; } catch (Exception $e) { $answer['message'] = 'Failed to load company profile.'; http_response_code(500); } exit(json_encode($answer)); ?>