Hi all,
 
In the site which i developed i calculated the number of visitors who visit my 
site (index.php page) and retrieved the result in a different page ( 
visitors.php ) with the code below
 
index page
 
<?php
session_start();
if($loggedin!=1)
{
mysql_connect("mysql","root","password");
mysql_select_db("login");
$query="select * from counter";
$result=mysql_query($query);
$row=mysql_fetch_array($result);
$row[hits]++;
$nohits=$row[hits];
$update=mysql_query("UPDATE counter SET hits=$row[hits]");
$hit=$row[hits];
$loggedin=1;
session_register('loggedin');
session_register('hit');
}
?>
 
and in the visitors page i ve used this code
 
<?php
session_start();
mysql_connect("mysql","root","password");
mysql_select_db("login");
$query="select * from counter";
$result=mysql_query($query);
$row=mysql_fetch_array($result);
$hit=$row[hits];
session_register('hit');
?>
 
<?php echo $hit; ?> 
 
Now my client wants me to display number of visitors visited the site last week
Number of visitors visited the site last month
and the number of visitors visited the site so far.
 
Actually i ve implemented the last one.
 
can anyone please guide me to achieve those two tasks please.

                
---------------------------------
Do you Yahoo!?
  The New Yahoo! Movies: Check out the Latest Trailers, Premiere Photos and 
full Actor Database.

[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/CefplB/TM
--------------------------------------------------------------------~-> 

The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to