Browse Source

Registrations now work pog

master
root 1 year ago
parent
commit
9330f7801a
  1. 22
      src/register.php

22
src/register.php

@ -26,27 +26,35 @@ @@ -26,27 +26,35 @@
$error = "Wrong captcha.";
} else
{
$error = "This service is not available for registration at the moment. Please come back later.";
}
// $error = "This service is not available for registration at the moment. Please come back later.";
$args = array_map('escapeshellarg', array($_POST["username"], $_POST["email"], $_POST["pubkey"], $_POST["description"]));
$args_str = implode(" ", $args);
$error = `/srv/php-private/process_application.py $args_str 2>&1`;
}
}
?>
<p style="color: red"><?php echo $error; ?></p>
<form method="post" action="#">
<form method="post" action="#form" id="form">
<label>Username</label><br />
<input type="text" name="username" /><br /><br />
<input type="text" name="username"
value=<?php echo '"'.$_POST["username"].'"'; ?> /><br /><br />
<label>E-mail Address</label><br />
<input type="email" name="email" /><br /><br />
<input type="email" name="email"
value=<?php echo '"'.$_POST["email"].'"'; ?> /><br /><br />
<!-- TODO: Link to a page about how to get an SSH pubkey -->
<label>SSH public key</label><br />
<input type="text" name="pubkey" /><br /><br />
<input type="text" name="pubkey"
value=<?php echo '"'.$_POST["pubkey"].'"'; ?> /><br /><br />
<label>What does brings you here?</label><br />
<textarea name="description" rows=15
placeholder="Be clear, you don't have to write a whole essay."></textarea>
placeholder="Be clear, you don't have to write a whole essay."
><?php echo $_POST["description"]; ?></textarea>
<br /><br />
<center>

Loading…
Cancel
Save