PHP Code:
<html>
<head>
<title>Register.</title>
</head>
<body>
<center>
<h1>Register to play.</h1>
<form action="register.php?register=yes" method="post">
<b>Username:</b> <input type="text" name="user"><br>
<b>Password:</b> <input type="password" name="pass"><br>
<input type="submit" value="Register">
</form>
</center>
</body>
</html>
<?php
//connect to the database.
$dbhost = 'localhost'; //keep as localhost
$dbuser = 'root'; //keep as root
$dbpass = ''; //enter in your password for your database.
$dbname = 'coproj'; //probabally coproj
$conn = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($dbname);
$user = $_POST['user'];
$pass = md5($_POST['pass']);
mysql_query("INSERT INTO accounts (AccountID, Password, LogonType, LogonCount) VALUES ('$user','$pass','2','1')");
if ($_GET['register'] == "yes") {
echo "Thank you for registering you may now play.";
}
?>
1.Put apache password in here ---> ''; after it sais $dbpass. Password goes in between single quotes.
2. Upload and your done :s..






