This topic is locked

code to update counter field after login

9/24/2009 20:54:20
PHPRunner General questions
L
lewisekrantz author

Table Name = admins

ID Integer Main Key

Name varchar 30

Password varchar 30

LoginCounter integer
On every successful login I want to update the LoginCounter by 1
Exact code would be appreciated.

J
Jane 9/25/2009

Hi,
here is just a sample:

global $conn;

$strUpdate = "update admins set LoginCounter=LoginCounter+1 where Name='".$_SESSION["UserID"]."'";

db_exec($strUpdate,$conn);