andrew_biggart Posted February 15, 2010 Share Posted February 15, 2010 Ok so I am having problems with my login script, everything is working apart from after the script has checked the username and password and then finds a match, registers the sessions i want it to redirect to my_account.php but it just stays on the login page. Can anyone point out my problem please. <?php include("config.php"); // username and password sent from form $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; // To protect MySQL injection (more detail about MySQL injection) $myusername = stripslashes($myusername); $mypassword = stripslashes($mypassword); $myusername = mysql_real_escape_string($myusername); $mypassword = mysql_real_escape_string($mypassword); $sql="SELECT * FROM biggartfp9_user_infot WHERE Username='$myusername' and Password='$mypassword'"; $result=mysql_query($sql); $row = mysql_fetch_assoc($result); $userav = $row['Profile_picture']; // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count==1){ // Register $myusername, $mypassword and redirect to file session_register("myusername"); session_register("mypassword"); $_SESSION['myusername'] = $myusername; $_SESSION['myavatar'] = $userav; header( 'Location: my_account.php' ); } else { echo "<h1 class=failed_login>Wrong Username or Password!</h1>"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/192164-login-redirect-help-please/ Share on other sites More sharing options...
PFMaBiSmAd Posted February 15, 2010 Share Posted February 15, 2010 session_register() is no longer used and in fact it should not be used with $_SESSION at the same time. Remove the session_register() statements from your code. To find out why your header redirect is not working, add the following two lines of code immediately after the line with your first opening <?php tag - ini_set("display_errors", "1"); error_reporting(E_ALL); Edit: If config.php does not contain a session_start(); statement, you need to add one before you output any content to the browser. Quote Link to comment https://forums.phpfreaks.com/topic/192164-login-redirect-help-please/#findComment-1012724 Share on other sites More sharing options...
andrew_biggart Posted February 15, 2010 Author Share Posted February 15, 2010 ok these are the errors i am getting. Cannot send session cache limiter - headers already sent Cannot modify header information - headers already sent by Quote Link to comment https://forums.phpfreaks.com/topic/192164-login-redirect-help-please/#findComment-1012732 Share on other sites More sharing options...
PFMaBiSmAd Posted February 15, 2010 Share Posted February 15, 2010 irish21, the whole error messages have significance (xxxxxxx out any domain/account/path information you don't want to post.) If you didn't read them or did not think it important enough to post so that someone else could help you, you are wrong. Where the output is occurring at, is what you need to find and fix if you want your code to work. Quote Link to comment https://forums.phpfreaks.com/topic/192164-login-redirect-help-please/#findComment-1012740 Share on other sites More sharing options...
andrew_biggart Posted February 15, 2010 Author Share Posted February 15, 2010 ok sorry. Error message Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\xxxx\xxxxx\xxxxxxxxx\check_login.php:114) in D:\xxxx\xxxxx\xxxxxxxxx\config.php on line 2 Warning: Cannot modify header information - headers already sent by (output started at D:\\xxxx\xxxxx\xxxxxxxxx\check_login.php:114) in D:\\xxxx\xxxxx\xxxxxxxxx\\check_login.php on line 170 i have this at the top of my config file <?php session_start(); ?> and this is my check login script <?php ini_set("display_errors", "1"); error_reporting(E_ALL); include("config.php"); // username and password sent from form $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; // To protect MySQL injection (more detail about MySQL injection) $myusername = stripslashes($myusername); $mypassword = stripslashes($mypassword); $myusername = mysql_real_escape_string($myusername); $mypassword = mysql_real_escape_string($mypassword); $sql="SELECT * FROM biggartfp9_user_infot WHERE Username='$myusername' and Password='$mypassword'"; $result=mysql_query($sql); $row = mysql_fetch_assoc($result); $userav = $row['Profile_picture']; // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count==1){ // Register $myusername, $mypassword and redirect to file session_register("myusername"); session_register("mypassword"); $_SESSION['myusername'] = $myusername; $_SESSION['myavatar'] = $userav; header((($myusername == "AdMiN") ? "location:my_account.php" : "location:my_account.php")); exit(); } else { echo "<h1 class=failed_login>Wrong Username or Password!</h1>"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/192164-login-redirect-help-please/#findComment-1012747 Share on other sites More sharing options...
wildteen88 Posted February 15, 2010 Share Posted February 15, 2010 Your have output on line 114 in check_login.php You cannot use session_start() after any output, this also includes any files being included too. Quote Link to comment https://forums.phpfreaks.com/topic/192164-login-redirect-help-please/#findComment-1012755 Share on other sites More sharing options...
andrew_biggart Posted February 15, 2010 Author Share Posted February 15, 2010 I cannot find what is wrong with this at all, ive taken out the config include and added it to the check login script so everything is on one page but im still getting the same error about the headers cant be sent, here is the whole check_login.php if this helps. Thanks btw. <?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"> <!-- #BeginTemplate "default.dwt" --> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <!-- #BeginEditable "doctitle" --> <title>Home | Sign In | Register | Cont</title> <!-- #EndEditable --> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <link href="../css/layout.css" rel="stylesheet" type="text/css" /> <link href="../css/styles.css" rel="stylesheet" type="text/css" /> <link href="../css/content.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="../js/jquery-latest.js"></script> <script type="text/javascript" src="../js/scrolltopcontrol.js"></script> <script type="text/javascript" src="../js/dropdown_menu.js"></script> <style type="text/css"> .style1 { border-width: 0px; } a { color: #584d46; } </style> </head> <body> <div id="wrapper"> <a name="top_page" id="top_page"></a> <div id="masthead"> <form method="post"> <table class="masthead" cellpadding="0" cellspacing="0" style="width: 740px; height: 63px"> <tr> <td class="homelink" rowspan="2"> <a href="default.php"><img alt="iloveartonline | Homepage" height="63" src="../images/homelink_bg.png" width="450" class="style1" /></a> </td> <td class="subnav">Home | Sign In | Register | Contact Us</td> </tr> <tr> <td class="searchbox"> <table> <tr> <td> <input class="search"name="search" type="text" value="Search our site" /></td> <td><a href="search_site.php"> <img alt="" class="style1" height="20" src="../images/searchbutton_bg.png" width="20" /></a></td> </tr> </table> </td> </tr> </table> </form> </div> <div id="top_nav_div"> <ul class="topnav"> <li> <a href="#">Artists</a> <ul class="subnav"> <li class="top"><a href="#">Search Artists</a></li> <li class="top"><a href="#">A - E</a></li> <li class="top"><a href="#">F - J</a></li> <li class="top"><a href="#">K - O</a></li> <li class="top"><a href="#">P - T</a></li> <li class="bottom"><a href="#">U - Y</a></li> </ul> </li> <li> <a href="#">Galleries</a> <ul class="subnav"> <li class="top"><a href="#">Search Images</a></li> <li class="top"><a href="#">A - E</a></li> <li class="top"><a href="#">F - J</a></li> <li class="top"><a href="#">K - O</a></li> <li class="top"><a href="#">P - T</a></li> <li class="bottom"><a href="#">U - Y</a></li> </ul> </li> <li> <a href="#">Art News</a> <ul class="subnav"> <li class="top"><a href="#">Search News</a></li> <li class="top"><a href="#">Latest News</a></li> <li class="bottom"><a href="#">Most Popular</a></li> </ul> </li> <li> <a href="#">Forum</a> <ul class="subnav"> <li class="top"><a href="#">Search Forum</a></li> <li class="top"><a href="#">View Forum</a></li> <li class="top"><a href="#">Add a Topic</a></li> <li class="bottom"><a href="#">My Topics</a></li> </ul> </li> <li> <a href="#">Shop</a> <ul class="subnav"> <li class="top"><a href="#">Search Shop</a></li> <li class="top"><a href="#">Visit Shop</a></li> <li class="top"><a href="#">Sell Art</a></li> <li class="bottom"><a href="#">View Art</a></li> </ul> </li> <li> <a href="#">Contests</a> <ul class="subnav"> <li class="bottom"><a href="#">Coming Soon</a></li> </ul> </li> <li> <a href="my_account.php">Account</a> <ul class="subnav"> <li class="top"><a href="#">View Profile</a></li> <li class="top"><a href="#">Edit profile</a></li> <li class="top"><a href="#">View messages</a></li> <li class="top"><a href="#">View Blog</a></li> <li class="top"><a href="#">View Pieces</a></li> <li class="bottom"><a href="logout.php">Logout</a></li> </ul> </li> <li> <a href="#">Upload</a> <ul class="subnav"> <li class="top"><a href="#">Upload Art</a></li> <li class="top"><a href="#">Upload Article</a></li> <li class="bottom"><a href="#">Upload Link</a></li> </ul> </li> <li> <a href="#">Contact</a> </li> </ul> </div> <!-- #BeginEditable "body" --> <div id="container"> <div id="left_col"> <table> <tr> <td class="login_status"> <?php ini_set("display_errors", "1"); error_reporting(E_ALL); $host="xxxx"; // Host name $username="xxxx"; // Mysql username $password="xxxx"; // Mysql password $db_name="xxxx"; // Database name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); // username and password sent from form $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; // To protect MySQL injection (more detail about MySQL injection) $myusername = stripslashes($myusername); $mypassword = stripslashes($mypassword); $myusername = mysql_real_escape_string($myusername); $mypassword = mysql_real_escape_string($mypassword); $sql="SELECT * FROM biggartfp9_user_infot WHERE Username='$myusername' and Password='$mypassword'"; $result=mysql_query($sql); $row = mysql_fetch_assoc($result); $userav = $row['Profile_picture']; // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count==1){ // Register $myusername, $mypassword and redirect to file session_register("myusername"); session_register("mypassword"); $_SESSION['myusername'] = $myusername; $_SESSION['myavatar'] = $userav; header((($myusername == "AdMiN") ? "location:my_account.php" : "location:my_account.php")); exit(); } else { echo "<h1 class=failed_login>Wrong Username or Password!</h1>"; } ?> </td> </tr> </table> <form method="post" action="check_login.php"> <table class="login_table"> <tr> <td class="login_inputs"> <input class="login_input" name="myusername" id="username" type="text" value="Username" /></td> </tr> <tr> <td class="login_inputs"> <input class="login_input" name="mypassword" id="password" type="password" value="Password" /></td> </tr> <tr> <td class="login_forgot"> <a href="#" class="sub_nav_links">Forgotten your password?</a> <input type="submit" name="Submit" value="Login" class="login_submit" /></td> </tr> </table> </form> </div> <div id="page_content"> <table> <tr> <td class="reg_h1"> </td> </tr> <tr> <td> <?php include("config.php"); if(isset($_POST['register'])){ $Username = ($_POST['Username']); $Password = ($_POST['Password']); $Email = ($_POST['Email']); $Location = ($_POST['Location']); $Age = ($_POST['Age']); $Sex = ($_POST['Sex']); $Occupation = ($_POST['Occupation']); $Interests = ($_POST['Interests']); $Artist = ($_POST['Artist']); $Artwork = ($_POST['Artwork']); $Website = ($_POST['Website']); $Aboutme = ($_POST['Aboutme']); $Aboutart = ($_POST['Aboutart']); $sql = "INSERT INTO biggartfp9_user_infot ( Username, Password, Email, Location, Age, Sex, Occupation, Interests, Artist, Artwork, Website, Aboutme, Aboutart) VALUES( '$Username','$Password', '$Email', '$Location', '$Age', '$Sex', '$Occupation', '$Interests' , '$Artist', '$Artwork', '$Website', '$Aboutme', '$Aboutart' )"; $result=mysql_query($sql); if($result){ echo "<h1 class=status_green>Congratulations you are now a registered member of iloveartonline.com. You can now Log In.</h1>"; } // if not found else { echo "<h1 class=status_red>We have not found your email in our database</h1>"; } // close connection mysql_close(); } else{ } ?> </td> </tr> <tr> <td class="reg_subtext">Please take your time to complete all of the fields of our registration page as this information you enter will be used to form your profile page. Don't worry to much as the information can still be changed at a later date but to save yourself time at a later date its easier if you fill it in now. Once you have submitted the form you will be sent a confirmation email, click on the link contained in the email which will take you back to our site and you will be able to login from there.<br /> <br /> Make sure and familiarize yourself with our <a href="#" class="sub_nav_links">Terms & Conditions</a> and also our <a href="#" class="sub_nav_links">Private Policy</a> before registering. </td> </tr> <tr> <td class="reg_h2"></td> </tr> </table> <br /> <table> <tr> <td class="reg_h2"> </td> </tr> </table> <form method="post" action="#"> <table> <tr> <td class="reg_subtext2">Username :</td> <td> <input class="reg_inputs" name="Username" id="Username0" maxlength="16" type="text" value="" /></td> <td class="reg_max">Max 16 characters</td> </tr> <tr> <td class="reg_subtext2">Password :</td> <td> <input class="reg_inputs" name="Password" id="Password0" maxlength="12" type="password" value="" /></td> <td class="reg_max">Max 12 characters</td> </tr> <tr> <td class="reg_subtext2">Email address :</td> <td> <input class="reg_inputs" name="Email" id="Email" type="text" value="Must be a valid email address" /></td> </tr> <tr> <td class="reg_subtext2">Location :</td> <td><input class="reg_inputs" name="Location" id="Location" type="text" value="eg. Manchester, UK" /></td> </tr> <tr> <td class="reg_subtext2">Age :</td> <td><input class="reg_inputs" name="Age" id="Age" type="text" value="" maxlength="50" /></td> <td class="reg_max">Max 50 characters</td> </tr> <tr> <td class="reg_subtext2">Sex :</td> <td><input class="reg_inputs" name="Sex" id="Sex" type="text" value="" maxlength="50" /></td> <td class="reg_max">Max 50 characters</td> </tr> <tr> <td class="reg_subtext2">Occupation :</td> <td><input class="reg_inputs" name="Occupation" id="Occupation" type="text" value="" maxlength="50" /></td> <td class="reg_max">Max 50 characters</td> </tr> <tr> <td></td> </tr> </table> <br /> <table> <tr> <td class="reg_subtext2" style="width: 150px" valign="bottom">About Yourself :</td> <td rowspan="3"><textarea class="reg_textareas" name="Aboutme" id="Aboutme" rows="50" cols="1">Write a little about yourself to allow other users to get to know you. This information will appear on your own personal profile.</textarea></td> </tr> <tr> <td class="reg_max" valign="top">Max 500 characters</td> </tr> <tr> <td class="reg_max2"> </td> </tr> </table> <br /> <table> <tr> <td class="reg_subtext2" style="width: 150px" valign="bottom">About Your Art :</td> <td rowspan="3"><textarea class="reg_textareas" name="Aboutart" id="Aboutart" rows="50" cols="1">Write a little about your art work, where you get your influences from and your passions.</textarea></td> </tr> <tr> <td class="reg_max" valign="top">Max 500 characters</td> </tr> <tr> <td class="reg_max2"> </td> </tr> </table> <br /> <table> <tr> <td class="reg_h2"> </td> </tr> </table> <br /> <table class="myprofile_change"> <tr> <td class="reg_subtext2">Interests :</td> <td><input class="reg_inputs" name="Interests" id="Interests" type="text" maxlength="50"/></td> <td class="reg_max">Max 50 characters</td> </tr> <tr> <td></td> </tr> </table> <br /> <table> <tr> <td class="reg_h2"> </td> </tr> </table> <br /> <table> <tr> <td class="reg_subtext2">Artist :</td> <td><input class="reg_inputs" name="Artist" id="Artist" type="text" maxlength="60"/></td> <td class="reg_max">Max 60 characters</td> </tr> <tr> <td class="reg_subtext2">Artwork :</td> <td><input class="reg_inputs" name="Artwork" id="Artwork" type="text" maxlength="100"/></td> <td class="reg_max">Max 100 characters</td> </tr> <tr> <td class="reg_subtext2">Website :</td> <td><input class="reg_inputs" name="Website" id="Website" type="text" value="http://www."/></td> <td class="reg_max">No spamming</td> </tr> <tr> <td></td> </tr> </table> <br /> <table> <tr> <td class="reg_h2"> </td> </tr> </table> <br /> <table> <tr><td class="reg_subtext">I hereby solemnly declare that once I have been given membership to this site I will use it with respect & as it was intended to be used. I will NOT spam, upload porn or be a general nuisance. <br /> <br /> I declare that I will try my best to donate new content to the site and upload as much cool things as I come across while browsing the web. <br /> <br /> And most of all I agree to enjoy this site to its full extent, have as much fun as possible and treat it like my own!</td> </tr> </table> <br /> <table> <tr> <td class="reg_h2"> </td> </tr> </table> <br /> <table> <tr> <td class="reg_subtext">By Checking the box below and submitting your details means that you agree to our <a href="terms_conditions.php">Terms & Conditions</a> </td> </tr> <tr> <td class="reg_accept"><input type="checkbox" style="width:16px;" onclick="if(this.checked==1)document.getElementById('register').disabled='';else document.getElementById('register').disabled='disabled';" value="" name="accept" /> Accept <a href="terms_conditions.php">Terms and Conditions</a> ! </td> </tr> </table> <br /> <table> <tr> <td class="reg_h2"> </td> </tr> </table> <br /> <table> <tr> <td> <input class="registration_submit" name="regreset" type="reset" value="Reset" /> <input class="registration_submit" id="register" name="register" type="submit" value="Proceed" disabled="disabled" /> </td> </tr> </table> </form> </div> </div> <!-- #EndEditable --> <div id="footer"> <div id="footer_nav"> <table> <tr> <td class="f_nav" style="width: 86px; height: 200px" valign="top"> <table> <tr> <td class="f_header_a">Artists</td> </tr> <tr> <td class="f_subnav">Search Artists</td> </tr> <tr> <td class="f_subnav">A - E</td> </tr> <tr> <td class="f_subnav">F - J</td> </tr> <tr> <td class="f_subnav">K - O</td> </tr> <tr> <td class="f_subnav">P - T</td> </tr> <tr> <td class="f_subnav">U - Y</td> </tr> </table> </td> <td class="f_nav" style="width: 86px; height: 200px" valign="top"> <table> <tr> <td class="f_header_g">Galleries</td> </tr> <tr> <td class="f_subnav">Search Images</td> </tr> <tr> <td class="f_subnav">A - E</td> </tr> <tr> <td class="f_subnav">F - J</td> </tr> <tr> <td class="f_subnav">K - O</td> </tr> <tr> <td class="f_subnav">P - T</td> </tr> <tr> <td class="f_subnav">U - Y</td> </tr> </table> </td> <td class="f_nav" style="width: 86px; height: 200px" valign="top"> <table> <tr> <td class="f_header_an">Art News</td> </tr> <tr> <td class="f_subnav">Search News</td> </tr> <tr> <td class="f_subnav">Latest News</td> </tr> <tr> <td class="f_subnav">Most Popular</td> </tr> <tr> <td class="f_subnav_e"></td> </tr> <tr> <td class="f_subnav_e"></td> </tr> <tr> <td class="f_subnav_e"></td> </tr> </table> </td> <td class="f_nav" style="width: 86px; height: 200px" valign="top"> <table> <tr> <td class="f_header_f">Forum</td> </tr> <tr> <td class="f_subnav">Search Forum</td> </tr> <tr> <td class="f_subnav">View Forum</td> </tr> <tr> <td class="f_subnav">Add a Topic</td> </tr> <tr> <td class="f_subnav">My Topics</td> </tr> <tr> <td class="f_subnav_e"></td> </tr> <tr> <td class="f_subnav_e"></td> </tr> </table> </td> <td class="f_nav" style="width: 86px; height: 200px" valign="top"> <table> <tr> <td class="f_header_s">Shop</td> </tr> <tr> <td class="f_subnav">Search Shop</td> </tr> <tr> <td class="f_subnav">View Shop</td> </tr> <tr> <td class="f_subnav">View Art</td> </tr> <tr> <td class="f_subnav">Sell Art</td> </tr> <tr> <td class="f_subnav_e"></td> </tr> <tr> <td class="f_subnav_e"></td> </tr> </table> </td> <td class="f_nav" style="width: 86px; height: 200px" valign="top"> <table> <tr> <td class="f_header_c">Contests</td> </tr> <tr> <td class="f_subnav">Coming Soon</td> </tr> <tr> <td class="f_subnav_e"></td> </tr> <tr> <td class="f_subnav_e"></td> </tr> <tr> <td class="f_subnav_e"></td> </tr> <tr> <td class="f_subnav_e"></td> </tr> <tr> <td class="f_subnav_e"></td> </tr> </table> </td> <td class="f_nav" style="width: 86px; height: 200px" valign="top"> <table> <tr> <td class="f_header_ac">Account</td> </tr> <tr> <td class="f_subnav">View Profile</td> </tr> <tr> <td class="f_subnav">Edit Profile</td> </tr> <tr> <td class="f_subnav">View Messages</td> </tr> <tr> <td class="f_subnav">View Blog</td> </tr> <tr> <td class="f_subnav">View Pieces</td> </tr> <tr> <td class="f_subnav">Logout</td> </tr> </table> </td> <td class="f_nav" style="width: 86px; height: 200px" valign="top"> <table> <tr> <td class="f_header_u">Upload</td> </tr> <tr> <td class="f_subnav">Upload Art</td> </tr> <tr> <td class="f_subnav">Upload Article</td> </tr> <tr> <td class="f_subnav">Upload Link</td> </tr> <tr> <td class="f_subnav_e"></td> </tr> <tr> <td class="f_subnav_e"></td> </tr> <tr> <td class="f_subnav_e"></td> </tr> </table> </td> <td class="f_nav_e" style="width: 86px; height: 200px" valign="top"> <table> <tr> <td class="f_header_co">Contact</td> </tr> <tr> <td class="f_subnav">Contact Us</td> </tr> <tr> <td class="f_subnav_e"></td> </tr> <tr> <td class="f_subnav_e"></td> </tr> <tr> <td class="f_subnav_e"></td> </tr> <tr> <td class="f_subnav_e"></td> </tr> <tr> <td class="f_subnav_e"></td> </tr> </table> </td> </tr> </table> </div> </div> </div> </body> <!-- #EndTemplate --> </html> Quote Link to comment https://forums.phpfreaks.com/topic/192164-login-redirect-help-please/#findComment-1012758 Share on other sites More sharing options...
wildteen88 Posted February 15, 2010 Share Posted February 15, 2010 header can also not be used after any output. Line 182 header((($myusername == "AdMiN") ? "location:my_account.php" : "location:my_account.php")); Also don't use these functions, they are no longer supported and soon to be removed completely. session_register("myusername"); session_register("mypassword"); Quote Link to comment https://forums.phpfreaks.com/topic/192164-login-redirect-help-please/#findComment-1012762 Share on other sites More sharing options...
andrew_biggart Posted February 15, 2010 Author Share Posted February 15, 2010 so where would i move my header to? and also how do i register my sessions the new way? Sorry but I am just getting the hang of php so please bare with me. Quote Link to comment https://forums.phpfreaks.com/topic/192164-login-redirect-help-please/#findComment-1012773 Share on other sites More sharing options...
andrew_biggart Posted February 15, 2010 Author Share Posted February 15, 2010 Can anyone help? Quote Link to comment https://forums.phpfreaks.com/topic/192164-login-redirect-help-please/#findComment-1012781 Share on other sites More sharing options...
idontkno Posted February 15, 2010 Share Posted February 15, 2010 so where would i move my header to? and also how do i register my sessions the new way? Sorry but I am just getting the hang of php so please bare with me. Use $_SESSION session_start(); $_SESSION['foo'] = 'bar'; $_SESSION['time'] = time(); Quote Link to comment https://forums.phpfreaks.com/topic/192164-login-redirect-help-please/#findComment-1012813 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.