-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathafegir_usuari.php
More file actions
52 lines (47 loc) · 1.73 KB
/
afegir_usuari.php
File metadata and controls
52 lines (47 loc) · 1.73 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?
session_start();
if($_SESSION['logged'])
{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles.css" rel="stylesheet" type="text/css">
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type='text/javascript' src='menu_jquery.js'></script>
<title>Subir imágenes con php</title>
</head>
<body>
<?php include "barra_menu.php";//Incloem la barra del menu ?>
<center>
<h1> Afegir Usuari </h1>
<?php
if(isset($_GET["err"])){
$err = $_GET["err"];
if($err == "23"){
echo "<font color=\"green\"> Usuari Afegit Correctament!!</font>";
}else if($err == "22"){
echo "<font color=\"red\"> Nom Usuari repetit </font>";
}else if($err == "21"){
echo "<font color=\"red\"> Falten Camps! </font>";
}
}
?>
<div id='Formulari_u'>
<form id="subirImg" name="subirImg" enctype="multipart/form-data" method="post" action="php/serv_afegir_usuari.php">
<input id="element_form_u" name="nombre" type="text" placeholder="Nom Usuari"/><br>
<input id="element_form_u" name="email" type="text" placeholder="Email"/><br>
<input id="element_form_u" name="password" type="password" placeholder="Pass"/><br>
<input id="element_form_u" name="password2" type="password" placeholder="Repeteix Pass"/>
<input type="submit" id="button" name="subirBtn" id="subirBtn" value="Afegir Usuari" />
</form>
</div>
<center>
</body>
</html>
<?
} else {
header("Location: index.php");
}
?>