corillo181 Posted April 27, 2007 Share Posted April 27, 2007 i remember there was a tutorial in phpfreak tutorial section on building a membership system i can't find this tutorial any log, but my question is. how i make a User Authentication that was like the one they used? i want to know is once i get the query how i do the rest? if($_POST['Submit']){ $username=$_POST['username']; $password=$_POST['password']; if((!$username)||(!$password)){echo 'Please fill up all of the fields';}else{$get=mysql_query("SELECT * FROM tra_users WHERE username='$username' AND password='$password' AND activated='y'")or die(mysql_error()); $rows=mysql_num_rows($get); $row=mysql_fetch_assoc($get); if($rows>0){ $_SESSION['username']=$username; $_SESSION['user_id']=$user_id; header('Location:../home.php'); }else{ echo'not found';} } }else{} the session part is wha ti dont ge thow to make it work.. Link to comment https://forums.phpfreaks.com/topic/48882-user-authentication/ Share on other sites More sharing options...
The Little Guy Posted April 27, 2007 Share Posted April 27, 2007 - Login - http://snippets.tzfiles.com/snippet.php?id=4 - Sign up - http://snippets.tzfiles.com/snippet.php?id=16 - This one can be downsized a bit Link to comment https://forums.phpfreaks.com/topic/48882-user-authentication/#findComment-239587 Share on other sites More sharing options...
corillo181 Posted April 27, 2007 Author Share Posted April 27, 2007 i know hot to do it that way, but i was just looking for the way that it was done in that one tutorial it was something like if row greater than 0 then foreach($v as $key){ $_session['user_id=$user_id; }} Link to comment https://forums.phpfreaks.com/topic/48882-user-authentication/#findComment-239590 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.