Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <?php
- $link = mysqli_connect ("localhost", "nome_usuario", "senha_usuario", "teste");
- $UID = $_POST["UID”];
- $nome = $_POST["nome”];
- $endereco = $_POST["endereco”];
- # prepara a string com a operacao de insercao (SQL)
- $query = "INSERT INTO usuario (uid,nome,endereco) VALUES ('$UID','$nome','$endereco')”;
- # realiza a operacao
- $result = mysqli_query($link, $query);
- echo $result;
- echo
- # fecha a conexao com o mysql
- mysqli_close($link);
- echo "Dados inseridos na base...”;
- ?>
- <form action=”index.html” method=”post”>
- <input type=”submit” />
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement