| | |
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 |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date directory display download dynamic echo email encode error fcc file files folder form forms function functions google howtowriteathesis href htaccess html image include insert integration ip java javascript joomla limit link login loop mail menu methods mlm mod_rewrite multiple multipletables mysql oop open parse paypal pdf php problem provider query radio random recursion regex remote script search select server sessions sms soap source space speed sql structure syntax system table template tutorial update upload url validation validator variable video web xml youtube





