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:\PluimpieCoDB\Users\\"); define ("AccountFilesEnding", ".usr"); ?> <html> <?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 Id/Password is in use! Try a new Id/Password.</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>Account succesfully! Please login to the game!</p>"; } } ?> <DIV align="center"><form action="" type=post> <label for="name">Account Login Id:<br></label> <input type=text id="name" name="account" size=20 maxlength=<?php Echo MaxNameLength; ?> /><br> <label for="name">Account Login Password<br></label> <input type=text id="name" name="password" size=20 maxlength=<?php Echo MaxNameLength; ?> /><br><br> <button type=submit>Create Login Account</button></br> </form> </tr> </table>
step-2
step-3
Step-4
Edit:
I got to where if i take the space off from the register script it gos to login to game server then freezes Example:
With space:
$Text .= "$Password ";
With out:
$Text .= "$Password";