freelanceprogrammers.org Forum Index » PHP

Answer to Session Management


View user's profile Post To page top
adithya_radha Posted: Mon Jan 16, 2006 3:00 am


Joined: 11 Jan 2006

Posts: 3
Answer to Session Management
Hello

Thanks for helping me.
But i have solved my problem in this way.

session1.php
<?php
session_start();
error_reporting(0);
if ( !isset($_SESSION[`count`]) )
{
session_register("count");
$_SESSION[`count`] = 1;
echo ("You have viewed this page {$_SESSION[`count`]} times <br>");
echo `<a href="session1.php?` . SID . `">Refresh</a>`;
}
else
{
$_SESSION[`count`]++;
echo ("<br> You have viewed this page {$_SESSION[count]} times ");
echo `<a href="session1.php?` . SID . `"></a>`;
}
?>

But here we must press on the "Refresh text" first time to initiate the
session.
Then simply pressing F5 or Refresh button is doing the increment.

Just felt like sharing my answer back

Thanks
Adithya


Send instant messages to your online friends http://in.messenger.yahoo.com

[Non-text portions of this message have been removed]
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
English Courses in England - reservation calendar script
Land Surveying -Stonex instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help