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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:34:30+00:00 2026-06-06T01:34:30+00:00

I wonder whether someone may be able to help me please. Firstly, my apologies

  • 0

I wonder whether someone may be able to help me please. Firstly, my apologies as to some this be a very basic question, I’m very new to working with XML so please bear with me.

I’m using this section of code to successfully load marker data from a MySQL database, placing them on a Google map.

            downloadUrl("loadallmyfinds.php", function(data) {  
            var xml = parseXml(data);
            var markers = xml.documentElement.getElementsByTagName("marker");
            for (var i = 0; i < markers.length; i++) { 
            // obtain the attribues of each marker 
            var lat = parseFloat(markers[i].getAttribute("findosgb36lat")); 
            var lng = parseFloat(markers[i].getAttribute("findosgb36lon")); 
            var point = new google.maps.LatLng(lat,lng); 
            var locationname = markers[i].getAttribute("locationname"); 
            var finddescription = markers[i].getAttribute("finddescription"); 
            var html = "<b>" + 'Description: ' + "</b>" + finddescription; 
            var findcategory = markers[i].getAttribute("findcategory"); 
            // create the marker 
            var marker = createMarker(point,html,locationname,finddescription,findcategory);
            } 

XML Output

<markers>
<marker userid="27" findid="1" locationname="Test Location 1" findosgb36lat="53.0000" findosgb36lon="-1.00000" osgridref="" dateoftrip="21/06/2012" findcategory="Artefact" finddescription="A rare Roman vase."/>
</markers>

The problem I have, is that in it’s current state all records are being retrieved irrespective of the user, but I need to make this user specific, to be more precise, if the userid element value matches the variable I have on my form which is $idnum.

I thought that I may be able to do this via the PHP query that is being loaded in the above i.e. loadallmyfinds using a GET clause, but sadly this doesn’t work.

I’ve done some research into this and I believe, from my limited knowledge, that I may be able to this via XML, but I’m really not sure how to implement it.

i just wondered whether someone could possibly look at this please and offer some guidance on how I may go about it so the records are filtered.

Many thanks and kind regards

  • 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-06-06T01:34:33+00:00Added an answer on June 6, 2026 at 1:34 am

    You have the user id in the as $idnum. So, please change your ajax request from this:

    downloadUrl("loadallmyfinds.php", function(data) {

    to this:

    downloadUrl("loadallmyfinds.php?id=<?php echo $idnum?>", function(data) {

    and in the loadallmyfinds.php file:

    OLD COMMENT

    I guess you can store the userid in your session ($_SESSION['uid']=$userId;)

    …and in your loadallmyfinds.php file, read this session variable and return only that user related content.

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

Sidebar

Related Questions

I wonder whether someone may be able to help me please Firstly, my apologies
I wonder whether someone may be able to help me please. Firstly apologies as
I wonder whether someone may be able to help me please. Firstly my apologies.
I wonder whether someone may be able to help me please. Firstly, this is
I wonder whether someone may be able to help me please. Firstly, apologies because
I wonder whether someone may be able to help me please. Firstly apologies, because
I wonder whether someone may be able to help me please. Firstly, apologies, I'm
I wonder whether someone may be able to help me please. Using some excellent
I wonder whether someone may be able to help me please. From some demos
I wonder whether someone may be able to help me please. I'm using this

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.