Advertisement
Guest User

Untitled

a guest
Mar 11th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <?php
  2.  
  3. $host = "localhost";
  4. $user = "user";
  5. $pass = "password";
  6. $banco = "database";
  7.  
  8. $conexao = mysqli_connect($host,$user,$pass) or die(mysql_error());
  9. mysqli_select_db($conexao,$banco) or die(mysql_error());
  10.  
  11.  
  12. $nome = $_POST['nome'];
  13. $idade = $_POST['idade'];
  14. $peso = $_POST['peso'];
  15. $altura = $_POST['altura'];
  16. $sexo = $_POST['genero'];
  17. $email = $_POST['email'];
  18. $login = $_POST['login'];
  19. $senha = $_POST['senha'];
  20.  
  21. $sql = mysqli_query($conexao,"INSERT INTO usuarios(nome, idade, peso, altura, sexo, email, login, senha,ativo)
  22. VALUES('$nome','$idade','$peso','$altura','$sexo','$email','$login','$senha',0)");
  23.  
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement