general Posted August 4, 2007 Share Posted August 4, 2007 hi! I'm coding a user authentication script for a site and it needs to have the following features: 1) after logging in return to the previous page the user was in 2) if cookies are disable pass session id thru url and since the site is an ezine alot of variables will be passed thru the url. for example the category.php page will have a url like this: category.php?setCat=1&sortby=date&numresultperpage=5 my current plan is this: each page will start with session_start(); once the user log ins from any page it will post the data to authentication.php?returntopage=whicheverpage.php in authentication.php page all the data will be verified and if the user is found in database it will make username a session variable and goto session.php?htmlspecialchar(SID) in session.php page it will start session and check if session cookie is found. if session cookie not found then $_session['append0']="?".htmlspecialchars(SID)."&" //to be used if more variables will be passed with the url eg: echo "category.php".$_session['append0']."setCat=1&sortBy=date; $_session['append1']="?".htmlspecialchars(SID) // to be used if no variables will follow if session cookie found then $_session['append0']="?" $_session['append1']="?" the $_session['append0']/$_session['append1'] will be added to every url in the site any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/63276-help-and-input-needed-coding-a-very-complete-user-authenication-code/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.