3
I have that function:
function envia($mensgem) {
$odb = mysqli_connect(HOST, USER, PASS, DATABASE);
mysqli_query($odb, "INSERT INTO pedidos VALUES ('$mensagem')");
mysqli_close($odb);
}
I use this function on another page calling her by require('funcoes/envia.php');
, run this function using envia('Olá mundo');
, I will check on phpMyAdmin and nothing has been registered.
I would like Insert to perform within functions to facilitate :)
PS: The HOST, USER, PASS and DATABASE were correctly defined
Whoa, thanks! I didn’t think I needed to inform the names of the columns :)
– Gustavo Dias
You’re welcome @Gustavodias
– Miguel