PDA

View Full Version : Apostraphe causes MYSQL error in notes!


Diana Notacat
07-29-2005, 06:34 AM
Ayup ayup... When you add a user note that uses apostraphes ' <-- it will give you a mysql error! I don't think the average mod would remember to add slashes! XD

sv1cec
07-29-2005, 08:33 AM
LoL, you are right, stupid mistakes!

Open your Warn.php and find:


$DB_site->query("insert into ".TABLE_PREFIX."warn_notes (wid, warned_user, warned_by, warned_time, warned_note, warned_post, warned_type) values('','{$_POST['id']}','{$bbuser}','".time()."','{$note}','{$spost}','{$_POST['type']}')");


Right above that, add:


$note=addslashes($note);


I'll update the zip, thanks !