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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:53:38+00:00 2026-05-11T19:53:38+00:00

Lets say I have an array of javascript objects, and I am trying to

  • 0

Lets say I have an array of javascript objects, and I am trying to pass those objects to a php page to save them into a database. I have no problems passing a variable to the php and using $_POST[“entries”] on that variable but I can’t figure out how to pass an entire array of objects, so I can access my objects.entryId and .mediaType values on the php page.

Oh and before anyone asks, yes the reason I need to do it this way is because I have a flash uploader, that you guessed it.. uploads into a CDN server (remote) and the remote server only replies back with such js objects.

Thanks for any help anyone can provide.

Here is my JS functions:

function test() {
        entriesObj1 = new Object();
        entriesObj1.entryId = "abc";
        entriesObj1.mediaType = 2;
        entriesObj2 = new Object();
        entriesObj2.entryId = "def";
        entriesObj2.mediaType = 1;

        var entries = new Array();

        entries[0] = entriesObj1;
        entries[1] = entriesObj2;
        var parameterString;

        for(var i = 0; i < entries.length; i++) {
            parameterString += (i > 0 ? "&" : "")
              + "test" + "="
              + encodeURI(entries[i].entryId);
        }

        xmlhttp.open("POST","ajax_entries.php",true);

        xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlhttp.setRequestHeader("Content-length", parameterString.length);
        xmlhttp.setRequestHeader("Connection", "close");

        xmlhttp.onreadystatechange  = handleServerResponseTest;
        xmlhttp.send(parameterString);
    }
    function handleServerResponseTest() {
       if (xmlhttp.readyState == 4) {
         if(xmlhttp.status == 200) {
        alert(xmlhttp.responseText);
         }
         else {
            alert("Error during AJAX call. Please try again");
         }
       }
    }
  • 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-11T19:53:38+00:00Added an answer on May 11, 2026 at 7:53 pm

    maybe you need to take a look at json and jQuery ajax methods:

    .- http://blog.reindel.com/2007/10/02/parse-json-with-jquery-and-javascript/

    .- http://us.php.net/json_decode

    The turorial is maybe a little outdated because jQuery last version is 1.3.x but you will get an idea on that and about the PHP json functions… if your server does not have the json extension enabled you can use some php classes:

    .- http://google.com.co/search?rlz=1C1GPEA_enVE314VE314&sourceid=chrome&ie=UTF-8&q=php+json+class

    good luck!

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

Sidebar

Ask A Question

Stats

  • Questions 118k
  • Answers 118k
  • 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 There shouldn't be. There are several reasons why you could… May 11, 2026 at 11:29 pm
  • Editorial Team
    Editorial Team added an answer When you divide two int's into a floating point value… May 11, 2026 at 11:29 pm
  • Editorial Team
    Editorial Team added an answer Well, apart from your use of reinterpret_cast, it looks ok… May 11, 2026 at 11:29 pm

Related Questions

Say you have a very simple data structure: (personId, name) ...and you want to
Lets say I have an array which has n dimensions. Now in order to
Let's say I have an array of lots of values (C++ syntax, sorry): vector<double>
Let's say I have an array of floating point numbers, in sorted (let's say

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.