Code:
<?php
session_start();
if (isset($_SESSION['user'])) {
header ("Location: member.php");
}
?>
<html>
<!-- Script Has Been Created By Pauler From MxC 2011 -->
<head>
<title>
Account Manager
</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
</head>
<body>
<div id='box'>
<center>
<b>
<font size="6">
Account Manager V2
</font>
</b>
<br>
<a href="login.php">Login</a> | <a href="register.php">Create An Account</a>
<br><br>
<form action="" method="POST">
<table>
<tr><td>Username:</td><td><input type="text" name="username" size="16"></td></tr>
<tr><td>Password:</td><td><input type="password" name="password" size="16"></td></tr>
<tr><td><input type="submit" name="submit" value="Register"></td></tr>
</table>
</form>
<?php
include ('connect.php');
$username = $_POST['username'];
$password = $_POST['password'];
$submit = $_POST['submit'];
if ($submit) {
$check = mysql_num_rows(mysql_query("SELECT * FROM accounts WHERE login='".$username."'"));
if ($check == 0) {
$password = base64_encode( pack( "H*", sha1( utf8_encode( $password))));
mysql_query("INSERT INTO accounts VALUES ('".$username."', '".$password."', '0', '0', '0', '1')");
echo "<b>You have been registered. Visit the login page in order to login and edit your account.</b>";
}
else {
echo "<b>This username already exists.</b>";
}
}
?>
<br><br>
<div id="footer">
Developed By Pauler Account Manager Ver1.0 2011 MxC
</div>
</center>
</div>
</body>
</html>
It's something like this but as we tryed it. We are not that works.
That's only for create an account. If you wanna see and for change password ask me to post it.
Bookmarks