Change your insert statement to this:
$query_insert = "insert into event(ev_desc) values ('$desc_nl2br')";
$result = odbc_exec($connect, $query_insert);
For the ' character, just use addslashes on any variable you will be using for the insert.
$desc_nl2br = addslashes($desc_nl2br);
This is really a good idea for ANY database insertion and below is a small script that will change all variables received from a form into a database friendly one. Just put it at the top of the script:
Reset($HTTP_POST_VARS);
While(list($key, $val)=each($HTTP_POST_VARS)) {
$$key = addslashes($val);
}
:😛OOF:: All the POST (form) variables have addslashes. 🙂 Hope this helps!
John Cornett