-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform.php
89 lines (68 loc) · 2.19 KB
/
form.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
86
87
88
89
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<title>Formulário PHP</title>
</head>
<body>
<form action="proc.php" method="post" enctype="multipart/form-data">
<div>
<label for="nome">Nome: </label>
<input type="text" id="nome" name="nome" />
<?php
if (isset($_GET['erro']) && $_GET['erro'] == "nome") {
echo "<span style='color:red'>Insira seu nome!</span>";
}
?>
</div>
<br>
<div>
<label for="sexo">Sexo: </label>
<input type="radio" id="sexo" name="sexo" value="F" /> Feminino
<input type="radio" id="sexo" name="sexo" value="M" /> Masculino
<?php
if (isset($_GET['erro']) && $_GET['erro'] == "sexo") {
echo "<span style='color:red'>Insira seu sexo!</span>";
}
?>
</div>
<br>
<div>
<b><label for="email">Email:</label></b>
<input type="email" id="email" name="email">
<?php
if (isset($_GET['erro']) && $_GET['erro'] == "email") {
echo "<span style='color:red'>Insira seu email!</span>";
}
?>
</div>
<div>
<label for="senha">Senha: </label>
<input type="password" id="senha" name="senha" />
<?php
if (isset($_GET['erro']) && $_GET['erro'] == "senha") {
echo "<span style='color:red'>Insira sua senha!</span>";
}
?>
</div>
<br>
<div>
<b><label for="confirma">Confirme sua senha:</label></b>
<input type="password" id="confirma" name="confirma"/>
<?php
if(isset($_GET ['erro']) && $_GET ['erro'] == "confirma")
{
echo "<span style='color:red'>Use senhas iguais!</span>";
}
?>
</div>
<br>
<div>
<label>Arquivo: </label><br><br>
<input type="file" name="arq">
</div>
<br>
<input type="submit" value="Cadastro" />
</form>
</body>
</html>