-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreateuser.php
More file actions
executable file
·28 lines (24 loc) · 1.09 KB
/
Copy pathcreateuser.php
File metadata and controls
executable file
·28 lines (24 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<form action="createuser.php" method="post">
Username: <input type="text" name="name" /><br />
Voller Name: <input type="text" name="fullname" /><br />
Email: <input type="text" name="email" /><br />
Passwort: <input type="password" name="passwort" /><br />
<input type="hidden" name="order" value="save"/><br />
<input type="submit" value="speichern" />
</form>
<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
require_once('config.inc.php');
mysql_connect(DBHOST, DBUSER,DBPASS) OR DIE ("NICHT Erlaubt");
mysql_select_db(DBDATABASE) or die ("Die Datenbank existiert nicht.");
$order=$_REQUEST['order'];
if($order=="save") {
$name=$_REQUEST['name'];
$fullname=$_REQUEST['fullname'];
$email=$_REQUEST['email'];
$password_hash = md5($_POST['passwort']);
echo $password_hash;
mysql_query("INSERT INTO `user`(`name`, `fullname`, `email`, `password`, `group`) VALUES ('$name', '$fullname', '$email', '$password_hash', 'admin')");
}
//INSERT INTO `user`(`id`, `name`, `fullname`, `email`, `password`, `group`) VALUES ('sebkoch', 'Sebastian Koch', 's.t.koch77@gmail.com', 'blabla', 'admin')
?>