hi there

if ($act = "add") //Add the message...
 if (!empty($user_name) && !empty($user_ip) && !empty($user_message) && 
!empty($user_sex)) {
  if (!($html_support))
         $user_message = htmlspecialchars("$user_message");
  $user_message = ereg_replace("\n","<br>","$user_message");
  $userinfo = 
  $fp = fopen("$filename",'a');
  fwrite($fp, $userinfo);
  header("Location: index.php");

The code above is what I use for processing messages....
Everytime when I'm trying to use the function, htmlspecialchars(),
it'll replace " with &quot; . After that, I save the data and print out again,
the result will add "\" after the data... ( I don't want the extra "\")
There is an example.
When I try to type in ^^" to be my new message, it suppose to show the same thing.
However, in the saved data, it shows  ĦħĦħ^^\&quot; (ĦħĦħ is what I use to different 
from different filez)
I don't want the extra "\"....
however, I tried the way in below:

I use 

$user_message = eregi_replace("<","&lt;","$user_message");
$user_message = eregi_replace(">","&gt;","$user_message");

instead of the original one which is 

$user_message = htmlspecialchars("$user_message");

however, when I check the saved file, it still have and extra \ before the characters 
" .
god damn it....
I run this code in windows98SR2, maybe it's micro$oft's problem, is it?
plz help me.....thx dudes


Reply via email to