<?php
include once('config.php');

$link=mysql_connect(DB_HOST,DB_USERNAME,DB_PASSWORD);

if (!$link)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db(DB_DATABASE);

$query = "INSERT INTO".data_feedback."(First Name,Last Name,Email,Telephone,Comments)
VALUES
('". $_POST['firstname']."','". $_POST['lastname']."','". $_POST['email']."',". $_POST['telephone']."','". $_POST['comments']."')"

$data = mysql_query($query);
if($data)
{
    echo"Feedback is recieved";
}
else{
    echo"There is an error";
}
mysql_close($link);
?>

Ive got a syntax error on line 17.
This is the part:$data=mysql_query($query);
Im new to php so i cant figure it out,can anyone help

Well it seems that you are not declaring the data_feedback and you didnt close the query with ;

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.