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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:35:53+00:00 2026-06-12T04:35:53+00:00

I have a PHP page with this structure: <?php include ‘header.php’; include ‘content.php’; include

  • 0

I have a PHP page with this structure:

<?php
include 'header.php';
include 'content.php';
include 'footer.php';
?>

In the header.php, I have a function that counts some rows in a database.

$show =$mysql->count('someparam', $foo['bar']);
   if ($show > 0) {
       echo $show;
   }

That’s all good. Now, in the content.php file, the user can do operations that changes this $show value in the header, but I need to reload the page to see the updated $show number.

I want to solved this with JavaScript, but can’t figure out how to do it.

I tried solving it with a JavaScript reload on timer, like this:

<script>
function render (){
    $('.customer-database').html(.customer-database)
}
window.setInterval(render, 500);
</script>

the $show counter is inside the div class costumer-database. This is not working because I need to put the HTML code in after the HTML, but I don’t want to put HTML code in. I simply want to reload it. Is this possible?

I am open to any suggestions in both JavaScript and PHP.

  • 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-12T04:35:54+00:00Added an answer on June 12, 2026 at 4:35 am

    this should work:

    function render (){
        $('.customer-database').parent().load('myscript.php .customer-database');
        ^                              ^ ^     ^          ^ ^                ^ ^
        |   select the container in    | |     |   url    | | select content | |
        |   which to reload content    | |     | to your  | |  to put in the | |
        |______________________________| |     |   page   | |    container   | |
                                         |     |__________| |________________| |
                                         | send ajax call and replace content  |
                                         |_____________________________________|
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have gone through this page... http://www.php.net/manual/en/function.hash.php MD5 is 32 characters long while sha1
I have a website that use this style : /index.php?page=45&info=whatever&anotherparam=2 I plan to have
I have a php page called form.php. When you go to this page it
I have this PHP page where the user can select and un-select items. The
I'm really struggling with this. I have a viewdetails.php page, addnew.php page and a
i have tried this code to redirect a php page.but it s not working
i have this simple code to load data from other php page using get
I have a list menu in my php page. In this list menu i
I have my site as localhost/tutorials/rewrite/news.php on this page are titles from news articles
I have this page: http://www.thedome.it/cmsms/index.php?page=alla-spina I'd like to send a newsletter to subscribers every

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.