Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2016
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.40 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Cadastrando</title>
  6. </head>
  7.  
  8. <body>
  9. <?php
  10.     $host = "localhost";
  11.     $user = "root";
  12.     $pass = "";
  13.     $banco = "usuarios";
  14.     $conexao = mysqli_connect($host, $user, $pass, $banco) or die(mysql_error());
  15.     ?>
  16. <?php
  17. $nome=@$_POST['nome'];
  18. $sobrenome=@$_POST['sobrenome'];
  19. $nomecomp=($nome . " " . $sobrenome);
  20. $apelido=@$_POST['apelido'];
  21. $email=@$_POST['email'];
  22. $senha=@$_POST['senha'];
  23. $sexo=@$_POST['sexo'];
  24. $dia=@$_POST['datad'];
  25. $mes=@$_POST['datam'];
  26. $ano=@$_POST['ano'];
  27. $data=($dia."/".$mes."/".$ano);
  28. $cep=@$_POST['cep'];
  29. $telefone=@$_POST['telefonef'];
  30. $celular=@$_POST['telefonec'];
  31. $estado=@$_POST['estado'];
  32. $cidade=@$_POST['cidade'];
  33. $endereco=@$_POST['avenida'];
  34. $bairro=@$_POST['bairro'];
  35. $numero=@$_POST['numero'];
  36. $complemento=@$_POST['complemento'];
  37. $hash="%$&*(&%$&#*%$&*(&%$&#*%$&*(&%$&#*";
  38. $criptosenha = md5($hash . $senha);
  39. $acessouser = "0";
  40.  
  41.  
  42.  
  43.     $sql = mysqli_query($conexao, "INSERT INTO usuarios(nome, apelido, email, senha, sexo, data, cep, telefixo, telecel, estado, cidade, bairro, endereco, numero, complemento, acesso )
  44.     VALUES('$nomecomp', '$apelido', '$email', '$criptosenha', '$sexo', '$data', '$cep', '$telefone', '$celular', '$estado', '$cidade', '$endereco', '$bairro', '$numero', '$complemento', '$acessouser')");
  45.                 header("location: login.php");
  46.  
  47.  
  48. ?>
  49.  
  50. </body>
  51. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement