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? Link to comment https://forums.phpfreaks.com/topic/244542-_session-login-help/ 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 Link to comment https://forums.phpfreaks.com/topic/244542-_session-login-help/#findComment-1256119 Share on other sites More sharing options...
dominic600 Posted August 11, 2011 Author Share Posted August 11, 2011 yeah i have that.. Link to comment https://forums.phpfreaks.com/topic/244542-_session-login-help/#findComment-1256128 Share on other sites More sharing options...
dominic600 Posted August 11, 2011 Author Share Posted August 11, 2011 Well i got it lol Link to comment https://forums.phpfreaks.com/topic/244542-_session-login-help/#findComment-1256131 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.