Advertisement
DesenvolverBatch

uvalidacao.php

Sep 1st, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.46 KB | None | 0 0
  1. <?php include "1header.php"?>;
  2.  
  3. <?php include "2menu.php"?>
  4.  
  5.  
  6. <?php include "3entrar.php";?>
  7.  
  8.  
  9. <div id="conteudo" class="grid_12">
  10.  
  11.  
  12. <section id="topo1">
  13. <h2> Portal de Forteleza - Cadastro </h2>
  14. </section>
  15.  
  16.     <p class="conteudo">
  17.  
  18. <?php
  19.     require_once 'cuserClass.php';
  20.     $error1=0;
  21.     $nome= $_POST['nome'];
  22.         if (empty($_POST['nome'])){
  23.             $erroN = 1; $error1=1;
  24.         };
  25.  
  26.     $dataN= $_POST['dataN'];
  27.         if (empty($_POST['dataN'])){
  28.             $erroN = 1; $error1=1;
  29.         };
  30.  
  31.     $sexo= $_POST['sexo'];
  32.         if (empty($_POST['sexo'])){
  33.             $erroS = 1; $error1=1;
  34.         };
  35.  
  36.     $etnia= $_POST['etnia'];
  37.         if (empty($_POST['etnia'])) {
  38.             $erroE = 1; $error1=1;
  39.         };
  40.    
  41.     $login= $_POST['login'];
  42.         if (empty($_POST['login'])) {
  43.             $erroL = 1; $error1=1;
  44.         };
  45.  
  46.     $email= $_POST['email'];
  47.         if (empty($_POST['email'])) {
  48.             $erroM =1; $error1=1;
  49.     } else if (strpos('@', ($_POST['email']))) {
  50.             $erroM =1; $error1=1;
  51.     };
  52.  
  53.  
  54.     $senha= $_POST['senha'];
  55.     if (empty($_POST['senha'])) {
  56.             $errorP = 1; $error1=1;
  57.     };
  58.  
  59.     $senhaRep= $_POST['senhaRep'];
  60.     if (empty($_POST['senhaRep'])) {
  61.             $errorR="Coloque a senha"; $error1=1;
  62.         } else if (($_POST['senha'])!==($_POST['senhaRep'])) {
  63.             $erroR='Senhas diferentes';$erroP='Senhas diferentes';
  64.             $error1=1;
  65.     };
  66.  
  67.     $tipoConta= $_POST['tipoConta'];   
  68.         if (empty($_POST['tipoConta'])) {
  69.             $erroT=1; $error1=1;
  70.     };
  71.  
  72.     if ($error1!==1) {
  73.    
  74.             Echo "Nome digitado foi : ".$nome."<br>";
  75.             Echo "Data de Nascimento : ".$dataN."<br>";
  76.             Echo "Op��o sexual : ".$sexo."<br>";
  77.             Echo "Sua etnia : ".$etnia."<br>";
  78.             Echo "Seu Login : ".$login."<br>";
  79.             Echo "Seu e-Mail : ".$email."<br>";
  80.             Echo "Sua senha : ".$senhaRep."<br>";
  81.             Echo "Sua senha : ".$tipoConta."<br>";
  82.    
  83.     require_once 'cuserClass.php';
  84.  
  85.         $novocuserClass = new cuserClass($nome, $dataN, $sexo, $etnia, $login, $email, $senha, $senhaRep, $tipoConta);
  86.  
  87.     session_start();
  88.  
  89.         $_SESSION[$login] = $novocuserClass;
  90.  
  91.  
  92.         header('Location: http://localhost/meu site/uperfil.php');
  93.     exit;
  94.    
  95.     } else {
  96.         header('Location: http://localhost/meu site/ContCadastro.php');
  97.     exit;
  98.     };
  99. ?>
  100.    
  101.     </p>
  102. </div>
  103.    
  104. <?php include "4barralateral.php"?>
  105. <?php include "5rodape.php"?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement