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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.