-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinsertar_usuario.php
More file actions
executable file
·51 lines (33 loc) · 888 Bytes
/
insertar_usuario.php
File metadata and controls
executable file
·51 lines (33 loc) · 888 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
include "config.php";
$con = connection_update();
$nombre = $_POST["nombre"];
$usuario = $_POST["usuario"];
$pass = sha1($_POST["pass"]);
$colegio = $_POST["colegio"];
$sql = "INSERT INTO Usuario (nombre, usuario, password, colegio)
VALUES ('$nombre', '$usuario','$pass', '$colegio')";
$retval = mysql_query( $sql );
?>
<?php
$html = file_get_contents('header.html');
echo $html;
?>
<h2>Crear Usuario</h2>
<p>
<?php
if(! $retval )
{
die('Problema con la insercion, es probable que el usuario ya exista: ' . mysql_error());
}
echo 'Usuario insertado con exito.'
?>
</p>
</div>
</div>
</div>
<div class="cleaner"> </div>
</div>
</div>
<div align=center>Juez creado por: Daniel Serrano, Lenguaje creado por Alfredo Santamaria y Daniel Serrano</div></body>
</html>