-
Notifications
You must be signed in to change notification settings - Fork 0
/
insert_tutor.php
34 lines (29 loc) · 894 Bytes
/
insert_tutor.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
<?php
require 'Classes.php';
$cpf = $_POST['CPF'];
$nome = $_POST['Nome'];
$dataNascimento = $_POST['DataNascimento'];
$endereco = $_POST['Endereco'];
$email = $_POST['email'];
$pass = $_POST['pass'];
$tutor = new Tutor();
$tutor->CPF = $cpf;
$tutor->Nome = $nome;
$tutor->DataNascimento = $dataNascimento;
$tutor->Endereco = $endereco;
$tutor->Login = $email;
$tutor->Senha = $pass;
$tutor->CadastrarTutor();
$resu = $_SESSION["erroT"];
if($resu === true){
echo '<script type="text/javascript">';
echo 'alert("Cadastrado com sucesso.");';
echo 'window.location = "sign-up.html";';
echo '</script>';
}else{
echo '<script type="text/javascript">';
echo 'alert("Erro no cadastrado.");';
echo 'window.location = "sign-up.html";';
echo '</script>';
}
?>