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

  • SEARCH
  • Home
  • 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 7632085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:31:45+00:00 2026-05-31T06:31:45+00:00

Been playing with this for too long now! I’m using codeigniter. I am trying

  • 0

Been playing with this for too long now!

I’m using codeigniter.

I am trying to get some data back from an Ajax get request. Simply I want to check a MySQL DB to check if there is some data in there mathcing a given date. A simple true or false will be fine for the return.

Here is my request, followed by the PHP. The PHP does return the correct result into $data, but when it gets back to the Ajax request, the alert(data) is called and shows up as blank… nothing there.

Any ideas what I’m doing wrong?

Thanks

function get_appointment_data(request_date){

    $.ajax({
    url: 'http://localhost/doctor_today/booking/retrieve_cal_data',
    type: 'GET',
    data: request_date,
    success: function(data){
                alert(data);
    }
    });
}




function retrieve_cal_data() {

    $this->load->model('Booking_model');

    $date = $this->input->get('date');      
    $data = $this->Booking_model->get_calendar_data($date);

    return $data==null;
}
  • 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-31T06:31:46+00:00Added an answer on May 31, 2026 at 6:31 am

    I am not familiar with codeigniter but you must output the result of the function. Instade of ‘return’ you must use ‘echo’ to return result to ajax request.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay. Now I give up. I have been playing with this for hours. I
I have been playing with the demo code from this msdn article by Jeffrey
I've been scratching my head at this for too long - any insight would
I've been playing with Haskell data types for the past few days, using a
I've been playing this flash game and after I'd gotten over the initial ('lol,
I have been playing with this for a while, but the closest I have
I've been playing with this and I can't understand why the RegDeleteKey function is
I've been playing around with this for a couple of hours and have come
been playing around with ResolveClientUrl(~/Confirmation.aspx) and other methods.. I am tryin go get the
Ive been playing around with delegates trying to learn and I ran into one

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.