-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphp.php
More file actions
68 lines (52 loc) · 2.18 KB
/
php.php
File metadata and controls
68 lines (52 loc) · 2.18 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="./Style/style.css">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ProjetoWeb</title>
</head>
<body style="margin: 0px">
<div class="container">
<div class="header">
<div class="headerButtons">
<p class="hbutton"> <a href="index.html"> Home </a> </p>
<p class="hbutton"> <a href="projetos.html" id="proj"> Projetos </a> </p>
<p class="hbutton"> <a href="contato.html" id="contact"> Contato </a> </p>
<p class="hbutton"> <a href="php.php" id="php"> PHP </a></p>
</div>
<div class="language">
<button id="port"> pt </button>
<button id="eng"> en </button>
</div>
</div>
<div class="php-content">
<h3>Brinque com php</h3>
<form action="php.php" method="POST" >
<div class="form">
<div class="formItem">
Nome: <input type="text" name="name" class="input">
</div>
<div class="formItem">
E-mail: <input type="text" name="email" class="input">
</div>
<div class="formItem">
Cartão: <input type="text" name="creditCard" class="input">
</div>
</div>
<input type="submit" class="submit">
</form>
<?php
$name = isset($_POST["name"]) ? $_POST["name"] : '';
$email = isset($_POST["email"]) ? $_POST["email"] : '';
$creditCard = isset($_POST["creditCard"]) ? $_POST["creditCard"] : '';
?>
Bem vindo <?php echo htmlspecialchars($name); ?><br><br>
Seu email é: <?php echo htmlspecialchars($email); ?><br><br>
Cartão: <?php echo htmlspecialchars($creditCard); ?>
</div>
</div>
<script src="src/projetos.js"></script>
</body>
</html>