dominic600 Posted August 11, 2011 Share Posted August 11, 2011 so ive been trying to figure this out on my own with as little help possible. but now im stuck. so i got my commenting system all down and good but now i want to make it so inorder for anyone to comment they must login. theres my sessions, now would i make like a if statement like if($username && $userid){ $query = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$pass'") or die(mysql_error()); $numrows = mysql_num_rows($query); } $username = $_SESSION['username']; $userid = $_SESSION['userid']; Like would that work or am i missing something else, or would that be like completly wrong? Quote Link to comment Share on other sites More sharing options...
manix Posted August 11, 2011 Share Posted August 11, 2011 You don't want to forget session_start() on top Quote Link to comment Share on other sites More sharing options...
dominic600 Posted August 11, 2011 Author Share Posted August 11, 2011 yeah i have that.. Quote Link to comment Share on other sites More sharing options...
dominic600 Posted August 11, 2011 Author Share Posted August 11, 2011 Well i got it lol 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.