summaryrefslogtreecommitdiff
path: root/registration.php
diff options
context:
space:
mode:
authorAndreas Habel <mail@exceptionfault.de>2009-10-18 19:17:06 +0200
committerAndreas Habel <mail@exceptionfault.de>2009-10-18 19:17:06 +0200
commit393fc0aaee061ae40e511d89e2fbbacc59660319 (patch)
tree0ce73324690eb464dc28cbe522dd89cba2b28922 /registration.php
parent3df05ef0dc07d522f51d55fef4bbad4cdd54d298 (diff)
downloadwebsite-393fc0aaee061ae40e511d89e2fbbacc59660319.tar.gz
website-393fc0aaee061ae40e511d89e2fbbacc59660319.tar.bz2
website-393fc0aaee061ae40e511d89e2fbbacc59660319.tar.xz
website-393fc0aaee061ae40e511d89e2fbbacc59660319.zip
Added system call to create account.
Diffstat (limited to 'registration.php')
-rw-r--r--registration.php23
1 files changed, 19 insertions, 4 deletions
diff --git a/registration.php b/registration.php
index 8a91d7a..d609f22 100644
--- a/registration.php
+++ b/registration.php
@@ -53,10 +53,25 @@
}
else
{
- // everything was fine, create account
- $showform = false;
-
- // create a new account with ladmin here....
+ $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;
+ }
}
}
}