-
Notifications
You must be signed in to change notification settings - Fork 5
/
RegLog.php
85 lines (66 loc) · 2.59 KB
/
RegLog.php
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
require('headerAdmin.php');
if($_POST){
require("db/db.php");
if($_POST["pw"] == $_POST["pw2"]){
$database->insert("tbusuario",[ "login" => $_POST["login"],
"tipoUsuario" => $_POST["tipoUser"],
"password" => md5($_POST["pw"])
]);
header("Location: principal.php");
}else{
echo "password no coinciden";
}}
?>
<!DOCTYPE html>
<html lang="es">
<head>
<link rel="stylesheet" href="css/profile.css" />
</head>
<div id="bodySection">
<div class="container-profile">
<form method="post" id="formAdmin">
<div id="contentForm">
<b class="title">
</br>
<div id="titleProfile">Registro de nuevo usuario
</div>
</b>
</br>
<form method="post" action="RegLog.php">
<div id="form1">
<label for="correo" id="correo">Nombre de usuario</label>
<input name="login" type="text" required placeholder="Nombre de usuario" class="prof">
<label for="correo" id="correo">Tipo de usuario</label>
<select name="tipoUser">
<option>Seleccione</option>
<option>administrador</option>
<option>director</option>
<option>estandar</option>
</select>
</div>
<div id="form2">
<label for="pw" id="pw">Password:</label>
<input name="pw" type="password" required placeholder="**********" class="prof">
<label for="pw2" id="pw2">Repetir password:</label>
<input name="pw2" type="password" required placeholder="**********" class="prof">
</div>
<br>
<br>
<div id="bottons">
<p>
<input type="submit" value="Guardar" class="btnReg">
<input type="reset" name="reset" onClick="window.location.replace('principal.php')" value="Cancelar" class="btnReg">
</p>
</div>
</form>
</div>
</form>
</div>
</div>
</br>
</br>
<?php
require('footer.php');
?>
</html>