hi all,
i have database namely shopping for login with 3 fields
namely id,username and password as shown below
it will be shown asCode:create table login(id auto increment primary key,username varchar(20),password varchar(30));
id username password
1 admin admin123
2 ravi ravi123
i have also written a code in php so that when ever the new user enters using the time function it should
be stored in the database
below is he code....
tell me how to modify the above code so that when the new user logins that must be stored in the login table.....Code:<?php if (!isset($_SESSION)) { session_start(); } $now = time(); // time the session should have expired $limit = $now; // check the time of the last activity if (isset($_SESSION['last_activity']) && ($_SESSION['last_activity'] < $limit)) { // clear the session array $_SESSION = array(); header('Location:logout.php'); exit; } else { // the current time $_SESSION['last_activity'] = $now; } ?>



Reply With Quote
Bookmarks