Ok perfect. So what I have now is:
$bname = $_POST['bname']; // Business Name from form on addcomments.php
$comments = $_POST['comments']; // Comments from form on addcomments.php
$sql = "SELECT * FROM `customers` WHERE `Name` LIKE '$bname'";
mysql_query($sql);
if(!mysql_query($sql))
{
exit('<br>' . $sql . '<br>' . mysql_error());
}
else
{
print "Select Completed.";
}
Now, how would I go about Inserting the comments stored in $comments into the Comments section of 'Microsoft'. For example, Microsofts comments could be "a very big company", how would I insert it into Microsoft only, not all the others.
Something like this?:
$sql1 = "INSERT INTO (`Comments`) VALUES ('$comments')";
mysql_query($sql1);
if(!mysql_query($sql1))
{
exit('<br>' . $sql . '<br>' . mysql_error());
}
else
{
print "Insert Completed.";
}
When I try that I get this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(Comments) VALUES ('This is a comment')' at line 1