Jump to content

[SOLVED] USM - Urgent!


mnielsen

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.