בעיה בPHP
יש לי את הקוד הזה if(!$_POST){ echo '<form action='.$_SERVER['PHP_SELF'].' method=post> Account-Name: <input name=account type=text maxlength=10> <br> Password: <input name=password type=password maxlength=10> <br> Password(Again): <input name=confirm type=password maxlength=10> <br> E-Mail: <input name=email type=text> <br> Security Question: <input name=question type=text> <br> Answer: <input name=answer type=text> </font> <br> <input name=submit type=submit value=Submit> <p> Abuse of this system will result in deletion of accounts,characters, and permanent ban.</p> '; } else{ $account = $_POST['account']; $confirm = $_POST['confirm']; $date = date('F d, Y g:i A'); $password = $_POST['password']; $email = $_POST['email']; $question = $_POST['question']; $answer = $_POST['answer']; $ip = $_SERVER['REMOTE_ADDR']; $firstletter = substr($account, 0, 1); $ascii = ord($firstletter); $filename = $dir . '\\ASCII'.$ascii.'\\'.$account.'.txt'; if($account == '') { echo 'Account creation failed. Please fill out all fields.'; } elseif(file_exists($filename)) { echo 'Account creation failed. Account name already exists.';} elseif($email == '') { echo 'Account creation failed. Please fill out all fields.';} elseif(!ereg("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*$", $email)){ echo 'Account Creation Failed. Please enter a valid E-Mail.'; } elseif($password != $confirm) { echo 'Account creation failed. Password does not match confirmation password.';} else{ $fp = fopen($filename, 'w+'); $string = 'Account Created: '.$date.' With the IP: '.$ip.' [NAME] account-name = '.$account.' [PASSWORD] account-password = '.$password.' [ACCOUNT-STATUS] account-valid-time = 0 account-valid-date = 2003 4 5 account-change-password = 2003 3 29 [ETC] account-Gender = Male account-Age = account-Birth-Year = xxxx account-Birth-Month = xx account-Birth-Day = xx account-RealName = a account-SSN = aaaaa account-Email = '.$email.' account-Quiz = '.$question.' account-Answer = '.$answer.' account-created-by = DarkZero\'s Account Generator'; $write = fputs($fp, $string); fclose($fp); echo 'Account created successfully, you may now login.'; } } ?> וזה צריך להיראות כמו בעמוד הזה: http://80.179.212.199/AccountCreator.php וככה זה אצלי(בדף HTML) אז מה אני צריך לשנות?
יש לי את הקוד הזה if(!$_POST){ echo '<form action='.$_SERVER['PHP_SELF'].' method=post> Account-Name: <input name=account type=text maxlength=10> <br> Password: <input name=password type=password maxlength=10> <br> Password(Again): <input name=confirm type=password maxlength=10> <br> E-Mail: <input name=email type=text> <br> Security Question: <input name=question type=text> <br> Answer: <input name=answer type=text> </font> <br> <input name=submit type=submit value=Submit> <p> Abuse of this system will result in deletion of accounts,characters, and permanent ban.</p> '; } else{ $account = $_POST['account']; $confirm = $_POST['confirm']; $date = date('F d, Y g:i A'); $password = $_POST['password']; $email = $_POST['email']; $question = $_POST['question']; $answer = $_POST['answer']; $ip = $_SERVER['REMOTE_ADDR']; $firstletter = substr($account, 0, 1); $ascii = ord($firstletter); $filename = $dir . '\\ASCII'.$ascii.'\\'.$account.'.txt'; if($account == '') { echo 'Account creation failed. Please fill out all fields.'; } elseif(file_exists($filename)) { echo 'Account creation failed. Account name already exists.';} elseif($email == '') { echo 'Account creation failed. Please fill out all fields.';} elseif(!ereg("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*$", $email)){ echo 'Account Creation Failed. Please enter a valid E-Mail.'; } elseif($password != $confirm) { echo 'Account creation failed. Password does not match confirmation password.';} else{ $fp = fopen($filename, 'w+'); $string = 'Account Created: '.$date.' With the IP: '.$ip.' [NAME] account-name = '.$account.' [PASSWORD] account-password = '.$password.' [ACCOUNT-STATUS] account-valid-time = 0 account-valid-date = 2003 4 5 account-change-password = 2003 3 29 [ETC] account-Gender = Male account-Age = account-Birth-Year = xxxx account-Birth-Month = xx account-Birth-Day = xx account-RealName = a account-SSN = aaaaa account-Email = '.$email.' account-Quiz = '.$question.' account-Answer = '.$answer.' account-created-by = DarkZero\'s Account Generator'; $write = fputs($fp, $string); fclose($fp); echo 'Account created successfully, you may now login.'; } } ?> וזה צריך להיראות כמו בעמוד הזה: http://80.179.212.199/AccountCreator.php וככה זה אצלי(בדף HTML) אז מה אני צריך לשנות?