Jump to content

PHP - Dynamic Page counter


Recommended Posts

 

I have a dynamic page , which fetch data from database . Say for eg there are 2 record which is generated depending on query . So what i want to do is when some one click the Home link on 1st record , it should go to next page and over there php code is there which will increment the counter that is how many times the page is visted

 

Similarly when 2nd record Home link is clicked it should go to some page and then again again counter for that page is incremented

 

so say eg

 

Home Page - 1st Record - Page : http://www.abc.com/Wakad-T4248349

 

Home Page - 2nd Record - Page : http://www.abc.com/Himn-T3333333

 

Or another way of doing this , please help

 

<div id="menubar">
  <ul>
    <li class="current_page_item">
      <a href="count.php" name="abc<?php $i; ?>">Home</a>
      <?php $_SESSION['Home']=$row['ID']; echo $_SESSION['Home'];?>
    </li>
  </ul>
</div>


<div id="menubar">
  <ul>
    <li class="current_page_item">
      <a href="count.php" name="abc<?php $i; ?>">Home</a>
      <?php $_SESSION['Home']=$row['ID']; echo $_SESSION['Home'];?>
    </li>
  </ul>
</div>

 

 

Link to comment
https://forums.phpfreaks.com/topic/239661-php-dynamic-page-counter/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.