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

Help with search.php
Hello All

I need the search engine on a site I am building at the moment to display the searc

PHP loop
Okay so I have several "articles" stored in a mysql database and am attempting to echo tho

Grouping and sorting results
Please help with this query.

I have 2 tables in a database, countires and cities. states look

Running a cron job through PHP/Apache?!
Hello all,
I have a PHP script which makes a cron file from user input. When i try to run the cro

start new row of pictures
on my site www.budstreasureauctions.com there is a featured auctions box that users will pay to get

Google Map
I have done Google Map Integration for one my project. But for that we need the "latitude and l

xApp Analytics in BI 7.0
Dear all,

I am trying to implement xApp Analytics in BI 7.0. After I installed the analyt

Batch Related Pricing
Hi, I need some clarity on the batch related pricing

For example the following are the b

Please Help my PHP Dating Function.
Hi everyone!

Well here is my code that displays this:

It works wonderful.


Header is not working in IE
Hi ! header function is not working in IE but it works in FF, Safari, Chrome. any help please. :

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