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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:31:05+00:00 2026-05-22T15:31:05+00:00

I modified the code here (http://www.w3schools.com/PHP/php_ajax_database.asp) to update and display my database after an

  • 0

I modified the code here (http://www.w3schools.com/PHP/php_ajax_database.asp) to update and display my database after an input box is typed and a button is clicked to submit.
I have

<form method="post" action="process.php" id="processer" onsubmit="showUser('me');">
<label for="Process">Process</label><input type="text" name="process" id="process">    
<input type="submit" value="Process">
</form>

My Ajax code sends a:

xmlhttp.open("GET","getuser.php?q="+str+"&t=" + Math.random(),true);
xmlhttp.send();

and finally my getuser.php is

<?php
$q=$_GET["q"];

$con = mysql_connect('localhost', 'root', '');
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("short", $con);

$sql="SELECT * FROM table WHERE creator = '$q'";

$result = mysql_query($sql);

echo "<table border='1'>
<tr>
<th>id</th>
<th>data</th>
    </tr>";
    while($row = mysql_fetch_array($result))
      {
    echo "<tr>
    <td>" . $row['id'] . "</td>
    <td>" . $row['data'] . "</td>
    </tr>";
      }
echo "</table>";

mysql_close($con);
?>

The problem is that when I click submit, sometimes 1 refreshes, sometimes 2 refresh, and others none at all. Like let’s say i’m submitting the numbers 1 through 10, first time through I see 1, 2, then after inputting 3, i dont see anything, then suddenly 3, 4, and then nothing then 5 (while I just inputted 6), then 6, then 7, 8.

Is my php display data getting cached? or how can i make the refreshing smooth and consistent?

Thanks in advance.

  • 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-22T15:31:05+00:00Added an answer on May 22, 2026 at 3:31 pm

    Try indexing your database so you get faster response times..

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

Sidebar

Related Questions

Here is nice piece of code that works fair in all browsers: http://www.imaputz.com/cssStuff/bigFourVersion.html Since
I'm trying to do the tutorial here: http://www.asp.net/entity-framework/tutorials/handling-concurrency-with-the-entity-framework-in-an-asp-net-mvc-application In the ActionResult Edit, I have
I'm working with a C# sample application (taken from here : http://www.piccoder.co.uk/content/view/42/26/1/4/ ) The
I am following an intro tutorial http://www.linuxinsight.com/files/alp/alp-ch01-getting-started.pdf . I have created the source files
I am trying to implement reset password functionality using the tutorial at http://www.binarylogic.com/2008/11/16/tutorial-reset-passwords-with-authlogic/ and
I ran across this chunk of code (modified) in our application, and am confused
I have the MySQL Connector/NET installed on my PC. I modified the source code
I've taken code from the MSDN page on Matrix Filters and modified it slightly.
EDIT: Modified title and added update. UPDATE : We no longer believe this is
Has anyone ever modified the post-new.php file in their WordPress installation? I want to

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.