I edited this regpage some, I removed the images and stuff, but how can I make it so that the max password limit AINT 8 WORDS/NUMBERS? I want the password limit to be freely chosen.
Here is the code:
Here is the code:
Code:
<?php
define ("MaxNameLength", 32);
define ("WrongChars", "\r\n"); // Type other Chars, which shouldn't be in the Names, behind \r\n, but before "
define ("AccountFilesPath", "C:\OldCODB\Users\\");
define ("AccountFilesEnding", ".usr");
?>
<?php // New Account?
If (IsSet($_GET["account"]["password"])) {
// Variables
$Account = $_GET["account"];
$Password = $_GET["password"];
$AllRight = True;
// Wrong Chars?
For ($I=0; $I<StrLen(WrongChars); $I++) {
If (StrPos($Account, SubStr(WrongChars,$I,1))) {
Echo "<p>Your Name musn't contain the char \"".SubStr(WrongChars,$I,1)."\"</p>";
$AllRight = False;
}
}
// File Exists?
If (file_exists(AccountFilesPath.$Account.AccountFilesEnding)) {
Echo "<p>This Account already exists!</p>";
$AllRight = False;
}
// All Right?
If ($AllRight) {
// File-Data
$Text .= "$Password ";
// Create File
File_Put_Contents (AccountFilesPath.$Account.AccountFilesEnding, $Text);
// Check File
if(!file_exists(AccountFilesPath.$Account.AccountFilesEnding)) {
echo "<p>Error!</p>";
}
Echo "<p>This Account is created succesfully!</p>";
}
}
?>
<div> </FONT></FONT></FONT></FONT></P></DIV>
<center></FONT>
<form action="" type=post>
<label for="name">Account:<div></label> <input type=text id="name" name="account" size=20 maxlength=<?php Echo MaxNameLength; ?> /><br>
<h1><center></center></h1>
<label for="name">Password:<div></label> <input type=password id="password" name="password" size=20 maxlength=<?php Echo MaxNameLength; ?> /><br>
<h1><center></center></h1>
<label for="name">Retype password:<div></label> <input type=password id="password" name="password" size=20 maxlength=<?php Echo MaxNameLength; ?> /><br>
<button type=submit>Register</button></DIV>