You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
im trying to update a from a form using php with works well for everything other then the TEXTarea i am using in the form to a text tpye field in the database just wonted to no if im using the right query
if (isset($_POST['desc'])){
$value_desc = trim($_POST['desc']);
if (!empty($value_desc)){
$query_desc = "UPDATE hotels SET desc = '$value_desc' WHERE name = '$id'";
mysql_query($query_desc) or die(mysql_error());
}
}
this is the error message i get so i guess it is the quary that is wrong
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 'desc = 'this is a test' WHERE name = 'king'' at line 1