Guest User

Untitled

a guest
Apr 16th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <input type="radio" name="situacao" value="bom">bom
  2. <input type="radio" name="situacao" value="regular">Regular
  3. <input type="radio" name="situacao" value="inrregular">Inrregular
  4.  
  5. <input type="submit" value="Cadastrar">
  6.  
  7. $situacao = $_POST['situacao'];
  8.  
  9. $servidor = "localhost";
  10. $usuario = "root";
  11. $senha = "";
  12. $dbname = "form";
  13.  
  14.  
  15. $conn = mysqli_connect($servidor, $usuario, $senha, $dbname); // faz a conexao
  16.  
  17.  
  18. //INSERT INTO FORMULARIO SITUACAO= ESCOLHE A TABELA SITUAÇAO DA TABELA FORMULARIO
  19. // VALUES('$SITUACAO') = RECEBE OS VALORES QUE TÊM O NAME SITUAÇAO
  20. $result_formulario = "INSERT INTO formulario(situacao) VALUES ('$situacao')";
  21. $resultado_formulario = mysqli_query($conn, $result_formulario);
Add Comment
Please, Sign In to add comment