-
Notifications
You must be signed in to change notification settings - Fork 0
/
register.php
79 lines (78 loc) · 2.72 KB
/
register.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
<?php
include_once("config.php");
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CatalogApp</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="js/jquery.maskedinput.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/script.js"></script>
<script type="text/javascript">
</script>
</head>
<body>
<div class="container register" id="register">
<div class="row">
<div class="col-xs-12 register-head">
<h1> Registre-se </h1>
</div>
</div>
<div class="row">
<div class="col-xs-12 register-form">
<form class="form-signin" id="formID" method="post" action="">
<div class="form-group">
<label for="inputlogin">Nome*</label>
<input type="text" class="form-control" name="name" id="name" required/>
</div>
<div class="form-group">
<label for="inputlogin">Razão Social*</label>
<input type="text" class="form-control" name="razao" id="razao" required/>
</div>
<div class="form-group">
<label for="inputlogin">CNPJ*</label>
<input type="text" class="form-control" name="username" id="cnpj" required/>
</div>
<div class="form-group">
<label for="inputlogin">E-mail*</label>
<input type="text" class="form-control" name="email" id="email" required/>
</div>
<div class="form-group">
<label for="inputlogin">Telefone*</label>
<input type="text" class="form-control" name="telefone" id="telefone" required/>
</div>
<div class="form-group">
<label for="inputpass">Senha</label>
<input type="password" class="form-control" name="password" id="pass" maxlength="8" required/>
<label for="repeatpass">Repita a senha</label>
<input type="password" class="form-control" name="repeat" id="repeat" maxlength="8" required/>
</div>
<div class="form-group">
<button type="submit" class="btn btn-default col-xs-12" name="cadastro">Solicitar Cadastro</button>
<?php
if(!(isset($_POST['cadastro']))){
echo $_POST['username'];
}else{
$usr = new Users;
$usr->storeFormValues($_POST);
if($result = $usr->register()) { ?>
<span class="pull-left"><?= $result; ?></span><?php
}else{?>
<span class="pull-left"></span><?php
}
}
?>
<a href="index.php" class="pull-right new-account">Voltar</a>
</div>
</form>
</div>
</div>
</div>
</body>
</html>