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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:44:08+00:00 2026-05-11T05:44:08+00:00

I am a mySQL noob, and have a slightly stupid question… I am using

  • 0

I am a mySQL noob, and have a slightly stupid question…

I am using jquery to send form to a php script which then stores the data in a mySQL database. On another page in my app, I need to get all the values from one column of said mySQL DB, using jquery again (I assume I will also have to write another php script) so I can use the retrieved data. I am very familiar with using POST or GET to send data, but all of a sudden realized I have no idea how to retrieve it in a way that it can be used by a jquery callback function.

By the way, I’m using php4.

Any help would be appreciated!

  • 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. 2026-05-11T05:44:09+00:00Added an answer on May 11, 2026 at 5:44 am

    You’re looking for json_encode().

    Here is an example of using PHP, JSON and AJAX that sends JSON to PHP. This tutorial sends JSON data back.

    By the way, are you using jQuery or similar Javascript framework? If not, I’d highly recommend it as it can abstract a lot of the cross-browser differences and error-handling with the ajax() call. Here is an example of .ajax() in action:

    $.ajax({     url: 'document.xml',     type: 'GET',     dataType: 'xml',     timeout: 1000,     error: function(){         alert('Error loading XML document');     },     success: function(xml){         // do something with xml     } }); 

    Now all that assumes you’re using PHP 5.2+ (which is when json_encode()/json_decode() were addd). If that’s not the case you may have to use XML instead.

    Here is an introduction to Javascript and XML and the manual for the PHP XML parser. You are using jQuery so XML parsing gets a bit easier, see this article.

    XML is more tedious to deal with (and the messages are slightly more verbose) but it’s arguably safer. For completeness it’s worth pointing out the security issues with JSON.

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

Sidebar

Related Questions

I'm a noob with mysql and php, and need some help :) I have
Sorry because this is a noob question. I'm new with MySQL: I wrote a
I have a PHP script vieworder.php that includes other scripts at the top. <?php
I am a total MySql noob. I have two tables, Computer and Technician. Computer
MySQL noob here; looked around first but couldn't find the answer to this question.
Sorry for a noob question regarding MySQL. I downloaded FlightStats to learn about mysql
I am a total SQL noob; sorry. I have a table mysql> describe activity;
I'm a complete mySQL & PHP noob, and in my table, whenever there is
Noob-ish question: I'm looking for a lightweight but decent php way to search all
I'm trying to debug some auto-generated code, but I am a mySQL noob. Everything

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.