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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:52:39+00:00 2026-05-21T11:52:39+00:00

I have a database which is updating values, which are positions of an opponent

  • 0

I have a database which is updating values, which are positions of an opponent in a multiplayer game.

My problem occurs in trying to update the opponent models with their updated position information.

I have two seperate php files to do this:

1.) update.php is called within the javascript file multiple times with

xmlhttp = new XMLHttpRequest();
xmlhttp.open(‘GET’, “xml_http_request.php?mod0=” + truckHeading + “&mod1=” + newhtr[1] + “&mod2=” + absRoll + “&lla0=” + lla[0] + “&lla1=” + lla[1] + “&lla2=” + lla[2] + “&pid=” + ‘1’ + “&rangeCheck=” + rangeCheck + “&ranger=” + ranger + “&namely=” + namely + “&message=” + message + “&unLoader=false”, true);
xmlhttp.send(null);

2.) retrieve.php is only called once in my index.php file

I believe the solution is to run the retrieve.php file once every time the update.php file is run (say right after the above code), but I don’t know what the line of code is to do that.

Here’s what’s in my retrieve.php file:

require("db1.php"); //for using live public database

$query="SELECT mod0, mod1, mod2, lla0, lla1, lla2, namely, message FROM positioner WHERE id = 1 ";
$result=mysql_query($query);

while ($row=@mysql_fetch_assoc($result)){

    $mod0 = $row['mod0'];
    $mod1 = $row['mod1'];
    $mod2 = $row['mod2'];
    $lla0 = $row['lla0'];
    $lla1 = $row['lla1'];
    $lla2 = $row['lla2'];

}

echo "<script> var mod0php = $mod0; </script>";
echo "<script> var mod1php = $mod1; </script>";
echo "<script> var mod2php = $mod2; </script>";
echo "<script> var lla0php = $lla0; </script>";
echo "<script> var lla1php = $lla1; </script>";
echo "<script> var lla2php = $lla2; </script>";

?>

  • 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-21T11:52:41+00:00Added an answer on May 21, 2026 at 11:52 am

    If these are numbers, then I don’t see a problem. but if they are strings, I see a problem at

    echo "<script> var mod0php = $mod0; </script>";
    echo "<script> var mod1php = $mod1; </script>";
    echo "<script> var mod2php = $mod2; </script>";
    echo "<script> var lla0php = $lla0; </script>";
    echo "<script> var lla1php = $lla1; </script>";
    echo "<script> var lla2php = $lla2; </script>";
    

    change this to

    echo "<script> var mod0php = '$mod0'; </script>";
    echo "<script> var mod1php = '$mod1'; </script>";
    echo "<script> var mod2php = '$mod2'; </script>";
    echo "<script> var lla0php = '$lla0'; </script>";
    echo "<script> var lla1php = '$lla1'; </script>";
    echo "<script> var lla2php = '$lla2'; </script>";
    

    you are missing qoutes around the strings.

    you would run it by

    include 'retrieve.php';
    or include_once 'retrieve.php';
    

    however, this incurs a security risks.
    another method is to have php retrieve it using http.

    $content = http_get("http://nowhere.com/retrieve.php"); //there are options on this call if you want
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database which contains the link to audio files. I am trying
I have a database which needs a status column updating to a single char
I have the following code, which basically takes values from a database and populates
I have a problem in updating my Oracle Database using NetBeans. I enter an
We have a process updating the database which uses the following SQL IF NOT
I have a database which, simiplified, is as follows : ID | SecondID |
I have a database which is going to have UMT timestamps in standard sql
I have a database which has a table recording when a vehicle was last
i have a database which contains an arabic tables , i can read it
I have a database which I regularly need to import large amounts of data

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.