is_valid) { $err = "The captcha was incorrect!"; $showform = true; } else { $username = escapeshellarg($_POST['username']); $password = escapeshellarg($_POST['password1']); $gender = ($_POST['gender'] == 1) ? "Male" : "Female"; // create a new account $handle = popen('/home/eathena/webexec/makeaccount', "w"); fputs($handle, "$username $gender $password"); $retval = pclose($handle); if ($retval == 0) { // everything was fine, create account $showform = false; } else { $err = "There was an unknown error while creating account."; $showform = true; } } } } if ($showform) { ?>

With this form you can register for a new account.

"; } ?>
" . $err . "
Username:
Password:
Retype password:
Gender:

Your account has been created!