4
<title>Extreme Dating - Create User</title>
8
if($_POST['hiddenStuff'] == "Something Strange") {
9
$password = sha1($_POST['password']."salt");
10
//If there is a $_POST that indicates that the add userscript should be run.
12
if ($_POST['isSuperUser'] == true && $_SESSION['userType'] == 1) {
13
$query = "INSERT INTO Users (
26
'{$_POST['firstName']}',
27
'{$_POST['surName']}',
33
$query = "INSERT INTO Users (
45
'{$_POST['firstName']}',
46
'{$_POST['surName']}',
56
<h1> Create a new user </h1>
58
<form action="./adduser.php">
61
if($_SESSION['userType'] == 1 ) {
62
//you are a superuser!
63
//you can add other superusers.
66
<td> <label for="user"> Is the user a Super User? </label> </td>
67
<td> <input type="checkbox" name="isSuperUser" id="super" \> </td>
73
<td> <label for="name"> User Name </label> </td>
74
<td> <input type="input" name="name" id="name" /> </td>
77
<td> <label for="passwd"> Password </label> </td>
78
<td> <input type="password" name="passwd" id="passwd" /> </td>
81
<td> <label for="firstname"> First Name </label> </td>
82
<td> <input type="input" name="firstName" id="firstname" /> </td>
85
<td> <label for="surname"> Sur Name </label> </td>
86
<td> <input type="input" name="surName" id="surname" /> </td>
89
<td> <label for="email"> E-mail </label> </td>
90
<td> <input type="input" name="eMail" id="email" /> </td>
93
<td> <label for="city"> City </label> </td>
94
<td> <input type="input" name="city" id="city" /> </td>
96
<input name="hiddenStuff" value="Something Strange" type="hidden" \>
97
<input id="input" type="submit" action="./adduser.php" />