I am doing a mysql insert however it is failing when i enter data that contains apostrophe or a comma (ie. John Doe's Company)
The field is set to VarChar (50)
Here is my insert code.
What is the correct syntax to perform an insert when entering non standard characters?
$sql = "INSERT into doctors (trade_name) VALUES ('$trade_name')";
$result = mysql_db_query($dbname, $sql) or die("Failed Query of " . $sql); //do the query