Skip to content

Instantly share code, notes, and snippets.

@junta1
Created February 23, 2015 13:16
Show Gist options
  • Save junta1/55b76a286d43c808eb50 to your computer and use it in GitHub Desktop.
Save junta1/55b76a286d43c808eb50 to your computer and use it in GitHub Desktop.
<?php
include "../banco_teste/conecta.php";
$nome = $_REQUEST["nome"];
$sexo = $_REQUEST["sexo"];
$textoarea = $_REQUEST["textoarea"];
$moradia = $_REQUEST["moradia"];
$transporte = $_REQUEST["transporte"];
$sqlinsert = "INSERT INTO formulario (`nome`, `sexo`, `textoarea`, `moradia`, `transporte`) VALUES ('$nome','$sexo','$textoarea','$moradia','$transporte')";
$resultado = mysql_query($sqlinsert);
if(!$sqlinsert){
echo "Não foi possível inserir.";
}
else{
echo "Inserido com sucesso!";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment