here is the problem
when i type a url and it is displayed ,it works .
but what is happening is that it doubles up on the name and message
like this >>name:messageurl,link name
it should be like this
name: message & link
name: message & link
but its not
after i added this code its been action up .
Code: Select all
$msg = str_replace ("\n"," ", $message);
$msg = stripslashes ($msg);
if ($msg != ""){
$fp = fopen($chat_file, "a+");
$fw = fwrite ($fp, "<i><a href=mailto:$email>@</a> <a href=$url target=_blank>$name</a></i> $message\n<br>");for ($i = 0; $i < $comments; $i++) {fwrite ($fp, $comfile[$i]);}fclose($fp);}
$fw = fwrite($fp, "<font color="#FF0000">$username :</font> $msg\n");
fclose($fp);}
$lines = file($chat_file);
$a = count($lines);
$u = $a - $chat_lenght;
for($i = $a; $i >= $u ;$i--){
echo $lines[$i];
}
?>Code: Select all
$fw = fwrite ($fp, "<i><a href=mailto:$email>@</a> <a href=$url target=_blank>$name</a></i> $message\n<br>");for ($i = 0; $i < $comments; $i++) {fwrite ($fp, $comfile[$i]);}fclose($fp);}cheers