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 534069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:34:24+00:00 2026-05-13T09:34:24+00:00

I am calling a .php file in this code. In the file fetchvalues.php, I

  • 0

I am calling a .php file in this code. In the file “fetchvalues.php”, I am fetching results from the database and want to return the column values back to the calling JQuery function and display them on HTML controls of my page.

How to do so?

$(document).ready(function() {
    $("#Edit").click(function() {
        $.get('fetchvalues.php', null, function() {
            alert('reached'); 
        });
    });
});

Edited:
Code: fetchvalues.php

<?PHP

 //Get selected row's RecordID column value
 $SelectedRowID = $_GET['UpdateRecordID'];
 //Open Connection
 $connection = mysql_connect("localhost:3306", "abcd", "abcd");
 mysql_select_db("pglobal", $connection);

 //Prepare query to retrieve results
 $FetchResultsQuery = "SELECT * FROM listing WHERE recordid=" . $SelectedRowID;

 try
 {
  $result = mysql_query($FetchResultsQuery);
  $row = mysql_fetch_row($result);
  if ($row)
  {
   $PostedDate = date('d.M.Y', strtotime($row[0]));
   $Places =  html_entity_decode($row[1]);
   $Company = html_entity_decode($row[2]);
   $Designation = html_entity_decode($row[3]);
   $ProjectDetails = html_entity_decode($row[4]);
   $DesiredCandidate = html_entity_decode($row[5]);
   $HRName = html_entity_decode($row[6]);
   $HRContact = html_entity_decode($row[7]);
   $Email = html_entity_decode($row[8]);

   $_SESSION['WorkMode'] = 'Edit';
   $_SESSION['DataToBeEdited'] = $PostedDate .'+'. $Places .'+'. $Company .'+'. $Designation .'+'. $ProjectDetails .'+'. $DesiredCandidate .'+'. $HRName .'+'. $HRContact .'+'. $Email;
  }
  else
  {
   $_SESSION['DataToBeEdited'] = "";
   return;
  }

 }
 catch(exception $err)
 {
  echo $err;
 }
?>
  • 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-13T09:34:24+00:00Added an answer on May 13, 2026 at 9:34 am

    If i could understand, you need back the response then:

    $(document).ready(function(){
      $("#Edit").click(function(){
      $.get('fetchvalues.php', null, function(response){
      alert(response);
      });
      });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 265k
  • Answers 265k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Does the message have to be shown in the switch… May 13, 2026 at 12:24 pm
  • Editorial Team
    Editorial Team added an answer Have you tried performing the same operations in native code… May 13, 2026 at 12:24 pm
  • Editorial Team
    Editorial Team added an answer No you do not need to delete instances of values… May 13, 2026 at 12:24 pm

Related Questions

I have a .php file with HTML code also in it. Through this file
In a Form, I am calling a PHP file if the validation passes. My
I have couple of forms on my php page. I am using jQuery (&
I wrote a small PHP application several months ago that uses the WordPress XMLRPC
I saw a post on this already, but it didn't really provide a solution

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.