| | |
automatic log out. stop it!
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Dec 2008
Posts: 12
Reputation:
Solved Threads: 0
hallo there,
i ve implemented a log in system which works just fine. i have a simple form username and psw and when the user pushes the button "ok" i check into mysql database if those names exists. if yes, i create a session and i keep some variables so i can use them later.
the code
i had no problem at all till i realized it today.
when someone is logged in he should fill in some forms. this may take a while. if the user is too late doing that, i am not sure for how long, he can not sudmit the form because he is no longer logged in...... the system shows exception and errors.
what can i do so the user may stay longer logged in???
i ve implemented a log in system which works just fine. i have a simple form username and psw and when the user pushes the button "ok" i check into mysql database if those names exists. if yes, i create a session and i keep some variables so i can use them later.
the code
PHP Syntax (Toggle Plain Text)
$qry="SELECT * FROM members WHERE login='$login' AND passwd='$password'"; $result=mysql_query($qry); //Check whether the query was successful or not //////////////////////'".md5($_POST['password'])."'"; if($result) { if(mysql_num_rows($result) == 1) { session_regenerate_id(); session_register("authenticated"); $member = mysql_fetch_assoc($result); $_SESSION['SESS_MEMBER_ID'] = $member['member_id']; $_SESSION['SESS_FIRST_NAME'] = $member['firstname']; $_SESSION['SESS_LAST_NAME'] = $member['lastname']; $_SESSION['SESS_CLASS'] = $member['class']; $_SESSION['SESS_FATHERSNAME'] = $member['fathersname']; session_write_close();
i had no problem at all till i realized it today.
when someone is logged in he should fill in some forms. this may take a while. if the user is too late doing that, i am not sure for how long, he can not sudmit the form because he is no longer logged in...... the system shows exception and errors.
what can i do so the user may stay longer logged in???
Last edited by dourvas; Oct 13th, 2009 at 5:28 am.
![]() |
Similar Threads
- HJT Log - I can't stop the popups (Viruses, Spyware and other Nasties)
Other Threads in the PHP Forum
- Previous Thread: session problem...
- Next Thread: How to force web page to open in internet explorer
| Thread Tools | Search this Thread |
# 5.2.10 action address apache api array auto autoincrement beginner binary broken cakephp checkbox class classes cms code cron curl database date dehasher destroy display dissertation domain dynamic echo echo$_get[x]changingitintovariable... email error errorlog fatalerror file files folder form forms function functions google href htaccess html if-else image images include insert ip javascript joomla legislation limit link load login mail masterthesis menu mlm multiple mysql mysqlquery oop open paypal pdf persist php popup problem query radio random record recursion remote script search server sessions sms sockets source space sql syntax system table tutorial update upload url validator variable video web youtube





