PHP - Mysqli INSERT INTO does not work

Asked

Viewed 74 times

0

$connection

registering.php Take it easy there
<?php
include 'conexao.php';

$nome = $_POST['nome'];
$email = $_POST['email'];
$sexo = $_POST['sexo'];
$nascimento = $_POST['nascimento'];
$telefone = $_POST['telefone'];

$result_usuario = $conexao->query("INSERT INTO agendass(nome, email, sexo, nascimento, telefone)
VALUES ('$nome', '$email', '$sexo', $nascimento, $telefone)");
$resultado_usuario = mysqli_query($conexao, $result_usuario);

echo ("$resultado_usuario");

?>
</body>
</html>

error in Phpstorm: Unable to resolve table 'agendas' and the same thing but Unable in all tables.

on the page details this error:

`Warning: mysqli_query(): Empty query in C:\xampp\htdocs\ProjetoAgenda\template\cadastrando.php on line 23`

1 answer

-2

$conexao

<?php

function conectar(){
    $con = new mysqli("localhost", "bhideki", "1233", "agendas");
    return $con;
}

$conexao = conectar();

?>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.