# php codes for counting no. of times logged..

**URL:** <https://www.phphelp.com/t/php-codes-for-counting-no-of-times-logged/13324>\
**Category:** Code Snippets\
**Created:** [May 16, 2011, 6:03am UTC](https://www.phphelp.com/t/php-codes-for-counting-no-of-times-logged/13324 "2011-05-16T06:03:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://www.phphelp.com/uploads/default/original/2X/2/243e9ed5d93c5653ce3186f18df16e019ce38445.png) [@system](https://www.phphelp.com/u/system)\
**Post date:** [May 16, 2011, 6:03am UTC](https://www.phphelp.com/t/php-codes-for-counting-no-of-times-logged/13324/1 "2011-05-16T06:03:39Z")

</div>

What is the better and efficient php code for displaying the no of times a user has logged???

---

<div class="post-metadata">

**Author:** ![plintu](https://www.phphelp.com/letter_avatar_proxy/v4/letter/p/b38774/32.png) [@plintu](https://www.phphelp.com/u/plintu)\
**Post date:** [July 10, 2011, 7:13pm UTC](https://www.phphelp.com/t/php-codes-for-counting-no-of-times-logged/13324/2 "2011-07-10T19:13:40Z")

</div>

add a new field to the users table call it logged, and then where they log do an update to add one every time they log 8)
