php - Column count doesn't match value count at row 1 -


i'm getting annoyed @ why isn't working, see no issue why can't add database !

this table

this insert form,

    $sql="insert reports (title, author, description, pubdate, tags, price)     values     (     '$_post[title]',     '$_post[author]',     '$_post[description]'     '$_post[pub_date]'     '$_post[tags]'     '$_post[price]'      )";      if (!mysqli_query($con,$sql))     {     die('error: ' . mysqli_error($con));     }     echo "1 record added";      mysqli_close($con); 

i've removed connection details security, every time submit form keeps giving me error , don't know why, if has ideas let know :)

try

$sql="insert reports (title, author, description, pubdate, tags, price) values ( '$_post[title]', '$_post[author]', '$_post[description]', '$_post[pub_date]', '$_post[tags]', '$_post[price]'  )";  if (!mysqli_query($con,$sql)) { die('error: ' . mysqli_error($con)); } echo "1 record added";  mysqli_close($con); 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -