Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7020935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:23:01+00:00 2026-05-27T23:23:01+00:00

I have implemented a PHP/MySQL web-service to deal with my iPhone application, and when

  • 0

I have implemented a PHP/MySQL web-service to deal with my iPhone application, and when i want to test it on the localhost, everything went great exception when i try to send the JSON encoded response:
$liste_des_themes=array();

$liste_des_themes=array("Préfectures et sous-préfectures","Mairie","Banque","Restaurant");
        $in_list = "'".implode("','", $liste_des_themes)."'";
        $stmt = $this->db->prepare('SELECT libelle,activite,adresse,tel,lat,lng FROM etablissements where type IN ('.$in_list.')');
        $stmt->execute();
        $stmt->bind_result($libelle,$activite,$adresse,$tel,$lat,$lng);
        while ($stmt->fetch()) {
            echo "$libelle | $activite | $adresse | $tel | $lat | $lng<br/>";
        }
        $stmt->close();     

        $result = array("themes" => $stmt);
        sendResponse(200, json_encode($result));
        return true;

I intend to invoke my web-service with a POST request, for the moment i try just to test it, i don’t know but i suppose it should return me a JSON data with the famous JSON {}, however i got this error:

Fatal error: Call to undefined function sendResponse()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:23:02+00:00Added an answer on May 27, 2026 at 11:23 pm

    sendResponse is not a php function.

    Try this:

    $result = array("themes" => $stmt);
            echo json_encode($result);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web service, defined(WSDL) and implemented in PHP. This one is relatively
I have a PHP web application which uses a MySQL database for object tagging,
I have kind of Listing application for iPhone application, which always calling a web
I have a PHP MySQL application which has a modular design. There are about
Working on a web based buying and selling application with PHP MySQL where users
I have implemented memcache in my PHP-MySQL based app and it gets updated regularly
I want to create my very first web app using HTML, MySQL, PHP and
I have a tagging system implemented in PHP and MySQL, with the following tables:
I have an own Tree object implemented in PHP. Say we have a tree
I'm using mysql and php for registration on my web-site. Registration is ok. Mysql

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.