0
I have a problem, I add the news and I get the error "Field 'valorClick' doesn’t have a default value".
This "Valorclick" is a value that clicking on the news link adds x money. 
Here is the code to add the news
addNotype.
<?php
include('configdb.php');
if(isset($_POST['submit']))
{
    $titulo = $_POST['titulo'];
    $texto = $_POST['noticia'];
    $link = $_POST['link'];
    #QUERY QUE INSERE NA BASE DE DADOS OS CAMPOS
    $query_addNoticia = "INSERT INTO artigos(titulo, texto, link, activo) VALUES ('$titulo', '$texto','$link',1)";
    $resultado_addNoticia = mysqli_query($mysqli,$query_addNoticia) or die(mysqli_error($mysqli));
    if($resultado_addNoticia)
    {
        #SE OS DADOS FOREM INTRODUZIDOS COM SUCESSO NA BASE DE DADOS:
        echo "
        <script language='JavaScript'>
        window.alert('Notícia publicada com sucesso. Clique para voltar à página inicial.')
        window.location.href='index.php';
        </script>";
    }
    else
    {
        #SE OS DADOS NÃO FOREM INTRODUZIDOS COM SUCESSO NA BASE DE DADOS, MENSAGEM DE ERRO:
        echo "
        <script language='JavaScript'>
        window.alert('Não foi possível publicar a sua notícia. Tente novamente, sff. Clique para voltar à página inicial.')
        window.location.href='index.php';
        </script>";
    }
}
?>
Here is the index.php where the news form is
echo ("<h1>Adicionar notícia</h1>");
                        echo ("<form id='addNoticia' name='addNoticia' method='post' action='addNoticia.php'>");
                        echo ("<p>");
                            echo ("<label for='titulo'>titulo</label>");
                            echo ("<input type='text' name='titulo' id='titulo' />");
                        echo ("</p>");
                        echo ("<p>");
                            echo("<label for='noticia'>noticia</label>");
                            echo("<textarea name='noticia' id='noticia' cols='45' rows='5'></textarea>");
                        echo ("</p>");
                        echo ("<p>");
                            echo("<label for='link'>link</label>");
                            echo("<input type='text' name='link' id='link' />");
                        echo ("</p>");
                            echo("<input type='submit' name='submit' id='submit' value='Adicionar notícia' />");
                            echo("<input type='reset' name='reset' id='reset' value='Limpar Campos' />");
                        echo("</form>");
                        echo("<hr>");



You need to specify a value for
valorClickwhen performing ainsert, this field is set to Notnull– Denis Rudnei de Souza
Yes but this field is not supposed to people see. But it can’t be Null either
– Joyana