restricting another login once you logout


Posted on 16th Feb 2014 07:03 pm by admin

Hello,

how can I restrict a page from login authenticating against info in a MySQL DB for a second time? Right now a login check against username and password in a MySQL table and allows access against that data. This works fine, but I want to disallow access once a person has logged in once and logged out.

My current code


<?php
//ini_set("display_errors","1");
//ERROR_REPORTING(E_ALL);

session_start();
/*logout after 65 minutes*/
function login_validate() {
/*Set the timeout on a login session. */
/*Default timout is ten minutes (600 seconds). */
$timeout = 15;
$_SESSION["expires_by"] = time() + $timeout;
}

$con = mysql_connect("localhost","ETSI","Editor") or die('Could not connect: ' . mysql_error());

mysql_select_db("ETSI_Internal") or die(mysql_error());




No comments posted yet

Your Answer:

Login to answer
58 Like 9 Dislike
Previous forums Next forums
Other forums

Php Mysql Page Loading Notice
Hi all,

I was wondering if there is a way (Sure there is) of showing a message or an image wh

Working with Dates, help.
Sooo to make a long story short, here's what im trying to accomplish.

I need to create a drop

Not adding to db
Hi, I can't figure out why it won't add the record to the database. It's just a simple form to get

PHP switch function help
Hi, I am trying to create a search function for a directory website. On the search function on html

Standard DES encryption script?
Can anybody point me to a tutorial or a short script that shows how to encrypt some text with salt i

Help =( !! Upload Pics [PHP script]
Hello
I need help with a php script [MULTIPLE UPLOAD IMAGES] , where I want to add a feature (wat

Saving PHP output as a file
I wondered if anyone knows how to save the rendered output of a PHP script as a file?

I have

user administration
Dear @all,

what I have to do to set the user defaults for new users. At the moment I woul

PHP hyperlinks generator
Hi

I need some help to get this done using php:


1 - I have few hyperlinks say 500

calendar dates and hours compare problem
i have a calendar in wordpress, everything works great except that i can make 2 meetings at the same

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash