Kyatric, I looked into mySql earlier today.
My server was taking too long to download the package so i will try again later. I understand the mysql part quite well. There are lots of example's out there for setting it up.
The table would look like this:
CREATE TABLE `myDB`.`usersystem` (
`userid` INT NOT NULL AUTO_INCREMENT ,
`username` VARCHAR( 50 ) NOT NULL ,
`password` VARCHAR( 32 ) NOT NULL ,
`email` VARCHAR( 50 ) NOT NULL ,
PRIMARY KEY ( `userid` )
)
then the php like this: <?php
session_start();
mysql_connect("localhost", "username of your database", "password of database");
mysql_select_db("myDB");
function user_login ($username, $password)
{
//take the username and prevent SQL injections
$username = mysql_real_escape_string($username);
//begin the query
$sql = mysql_query("SELECT * FROM usersystem WHERE username = '".$username."' AND password = '".$password."' LIMIT 1");
//check to see how many rows were returned
$rows = mysql_num_rows($sql);
if ($rows<=0 )
{
echo "Incorrect username/password";
}
else
{
//have them logged in
$_SESSION['username'] = $username;
}
}
?>
The thing i don't quite understand is then how do i find the users name from the php that saves the replay?