-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdbaddUser.php
More file actions
35 lines (24 loc) · 793 Bytes
/
dbaddUser.php
File metadata and controls
35 lines (24 loc) · 793 Bytes
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
29
30
31
32
33
34
35
<?php
require_once('config.php');
if ( isset($_POST['firstname']) &&
isset($_POST['lastname']) &&
isset($_POST['login']) &&
isset($_POST['passwd']) &&
isset($_POST['level']) &&
isset($_POST['language']) ){
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$login=$_POST['login'];
$passwd=$_POST['passwd'];
$level=$_POST['level'];
$language=$_POST['language'];
$qry="INSERT INTO `translation`.`members` ( `member_id`, `firstname`, `lastname`, `login`, `passwd`, `level`, `language` )
VALUES ( NULL , '$firstname', '$lastname', '$login', '".md5($passwd)."', '$level', '$language' )";
$result=mysql_query($qry);
//echo $qry;
if ($result) echo mysql_insert_id();
else echo "-1";
} else {
echo "-1";
}
?>