ujjainkar Posted November 5, 2007 Share Posted November 5, 2007 When any user logs in then i have to set cookie in another table say active _user which does not contain any data from static table where all the verification is to be done about user. Another table does not contain any data when user logs in i have to extract data from main table and insert it in another table so that i can retrieve info about active users. How can i do this? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
farkewie Posted November 5, 2007 Share Posted November 5, 2007 that is the most confusing Question i have EVER seen..... so you have 2 table? 1:) holds your login data 2:) holds your details you need a comon field in them lest say id "user_id" so when your user logs in you need to set a cookie holding the user id. then create userdtails.php <?php $user_id = $_COOKIE[user_id']; $sql = "SELECT * FROM table WHERE user_id='$user_id'"; $sql = mysql_query($sql); $row = mysql_fetch_assoc($sql); $email = $row['email']; ?> then at the top of each page <?php include ("sql_connection.php"); include ("userdetails.php"); // test use of above code echo $email; if this isnt what you want you may want to re-thing your wording. Quote Link to comment 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.