-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinserir_paciente.php
63 lines (50 loc) · 1.63 KB
/
inserir_paciente.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
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<style>
body {
background-image:url(fundog.jpg);
}
.h1{
color: white;
}
</style>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<title></title>
</head>
<body>
<?php
require 'conexao.php';
$nome = $_POST['nome'];
$cpf = $_POST['cpf'];
$telefone = $_POST['telefone'];
$rg = $_POST['rg'];
$email = $_POST['email'];
$senha = $_POST['senha'];
$sql = "insert into usuarios (nome, cpf, telefone, rg, email, senha) values ('$nome','$cpf','$telefone','$rg','$email','$senha')";
$result = mysqli_query($conn, $sql);
if ($result == true)
{
?>
<script>
window.alert("Cadastro com sucesso");
</script><br><br>
<center>
<h3><a href="Index.php">CONTINUAR</a></h3>
</center>
<?php
}
else
{
?>
<script>
window.alert("Erro de cadastro");
</script><br><br>
<center>
<h3><a href="frm_paciente.php">CADASTRAR-SE</a></h3>
</center>
<?php
}
?>
</body>
</html>