Good morning, I'm trying to make a news system, but the database does not receive php data. I would like to know how to resolve this.
<html>
<head>
<meta charset="utf-8">
<title>Inserir Notícia</title>
</head>
<body>
<?php
$host = "localhost";
$user = "root";
$pass = "";
$banco = "sistemanoticias";
$conexao = @mysql_connect($host, $user, $pass) or die(mysql_error());
mysql_select_db($banco) or die (mysql_error());
?>
<?php
$titulo = $_POST['titulo'];
$campo = $_POST['campo'];
$sql = mysql_query("INSERT INTO noticias(titulo, campo) VALUES('$titulo, $campo)");
echo "Notícia inserida com sucesso";
?>
<a href="inicio.html">Retornar para o Início</a>
</body>
</html>