here is a small regpage
it has no style
so u can use your own .css datas
Code:
<?php
$Server = MySQL_Connect ("localhost", "root","mysql pass");
If ($Server) {
If (IsSet($_POST["name"])) {
If (MySQL_DB_Query("database", "INSERT INTO accounts SET AccountID='".MySQL_Real_Escape_String($_POST["name"], $Server)."', LogonType='2'")) {
Echo "Registration successfully!<br>The Password will be the one which you type at your first Login! Have fun!";
} Else {
Echo "Registration failed!";
}
} Else {
?>
<form method=post action="">
<table style="position: absolute; top: 50%; left: 50%; width: 300px; height: 40px; margin-left: -150px; margin-top: -50px;">
<tr>
<td>
Name:
</td>
<td>
<input type=text name="name" maxlength=30 style="width: 100%;" />
</td>
</tr>
<tr>
<td colspan=2><input type=submit name="submit" value="Submit" style="width: 100%;" /></td>
</tr>
</table>
</form>
<?php
}
} Else {
Echo "Connection to the Database failed.";
}
?>
Code:
reg.php






