mnielsen Posted June 19, 2008 Share Posted June 19, 2008 Could someone please point me in the direction of a solid user management system, what I'm honestly after is a login script that I can base mine off. I'm not the greatest with PHP so I'm reaching out. Any suggestions? Link to comment https://forums.phpfreaks.com/topic/110840-solved-usm-urgent/ Share on other sites More sharing options...
hitman6003 Posted June 19, 2008 Share Posted June 19, 2008 Define "solid user management system". If you only want to manage username/password combos, then there is a million examples and tutorials on the internet. Google is your friend. If you want something more robust, e.g., profiles w/pictures, etc., then look at systems that provide similar functionality to what you are trying to create...if you are creating a forum, look to the code of SMF. If you are creating a wiki, look to the code of Mediawiki. Link to comment https://forums.phpfreaks.com/topic/110840-solved-usm-urgent/#findComment-568669 Share on other sites More sharing options...
andrewgarn Posted June 19, 2008 Share Posted June 19, 2008 Figured as your new to the forum you wanted something simple. There are many examples on the internet for this (google php login tutorial). You will need a mySQL database and a server with php installed on it. You should follow a tutorial to learn how to do it, rather than just copying off a website. However, Login is pretty simple: You create a database table in mySQL e.g. Users with two fields, username and password then create a html form which the user types their login details into e.g.: index.html <form name="login" method="post" action="login.php"> <h5>Please Log In:</h5> <p><b>Username: </b><input name="username" type="text" value="" /></p> <p><b>Password: </b><input type="password" name="password"></p> <p><input type="submit" name="submit" value="Login"></p> </form> this loads login.php which just needs to check that the details entered are in the table e.g. login.php $username = $_POST['username']; $password = $_POST['password']; //Database connection settings go here $logincheck = "SELECT * FROM user WHERE username = '$username' AND password = '$password'"; if (mysql_num_rows($result) != 1) { echo "Invalid Login - Please Try Again"; include "index.html"; } else { echo "Congratulations on you login"; } Link to comment https://forums.phpfreaks.com/topic/110840-solved-usm-urgent/#findComment-568671 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.