In my PM system , alot of people are complaining that my insert message function is destroying their messages like this
example message:
Well basically what it is , It\'s just someone who would be a moderator of ALL forums .. a \
a wasnt supposed to be the end of the message , but php put a \ and then cut everything else off , why?
Here is my function , what is wrong with this?
function insert_private_message($user_id, $subject, $message, $authorid){
global $tb_pms;
$subject = ereg_replace("<([^>]+)>", "", $subject);
$comment = ereg_replace("<([^>]+)>", "", $comment);
$sql = "
insert into $tb_pms (
id,
user_id,
subject,
message,
author_id,
author_ip,
pm_status,
readornot
) values (
'',
'$user_id',
'$subject',
'$message',
'$authorid',
'$_SERVER[REMOTE_ADDR]',
'inbox',
'N'
)
";
$query = mysql_query($sql) or die(mysql_error());
}
i dont see anything that would be causing that , do you?