Hai,
Saya ada chat script ni yang saya letak di http://www.macam2ada.com/iklan/testchat.php . Masalahnya bila saya cuba taip link je, hanya kuar text biasa sahaja tapi bukan link. Jadi nak tahula macamane nak jadikan boleh link setiap kali submit. Tak tahula nak buat camne, dah try remove htmlspecialcharacter dah, tapi same jek. Tolong erk, pleaseeee....
Berikut saya sertakan script tersebut:

Bahagian form:
<?
include "admin/inc.php";

function chC_get_ip()
{
foreach( array( 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_REMOTECLIENT_IP' ) as $var_name )
{
if( isset( $_SERVER[$var_name] ) && !empty( $_SERVER[$var_name] ) )
{
if( is_int( strpos( $_SERVER[$var_name], ', ' ) ) )
{
$array = explode( ', ', $_SERVER[$var_name] );
foreach( $array as $value )
{
if( chC_valid_ip( trim( $value ) ) == TRUE )
{
return trim( $value );
}
}
}
elseif( chC_valid_ip( $_SERVER[$var_name] ) == TRUE )
{
return $_SERVER[$var_name];
}
}
}
return $_SERVER['REMOTE_ADDR'];
}
if (!empty($_REQUEST["chat_button"]))
{
$chat_name=htmlspecialchars($_REQUEST["chat_name"]);
$chat_mes=htmlspecialchars($_REQUEST["chat_mes"]);
$chat_ip=chC_get_ip();
$sql_insert = "insert into chat (chat_name,chat_mes,chat_ip,chat_time) values ('$chat_name','$chat_mes', '$chat_ip', NOW())";
$result = mysql_query($sql_insert);

$sql_insert = "delete from chat where chat_time <= DATE_ADD(NOW(), INTERVAL -15 DAY)";
$result = mysql_query($sql_insert);
}
?>

<link rel="stylesheet" href="style.css" type="text/css" />
<table><tr>
<td align='left'>
<form action='chat_form.php' method='post'>
Nama: </td><td><input name='chat_name' type='text' size='20' maxlength='20' class="txt" value='<? echo $_REQUEST["chat_name"]; ?>'></td></tr>
<tr>
<td align='left'>
Message: </td><td><input name='chat_mes' type='text' size='35' maxlength='100' class="txt">&nbsp;<input name='chat_button' class='txt' type='submit' value='Chat'></tr></td>
</form>
</table>
Nie bahagian chatting
<?
include "admin/inc.php";
$limit=30;
?>

<meta http-equiv="Refresh" content="15">

<?
echo "<table cellspacing='0' cellpadding='0' width=\"100%\">";
$date_format="%m/%d/%Y %H:%i:%s";
$sql_str = "select * , DATE_FORMAT(chat_time, '$date_format') as chat_time from chat order by chat_time desc limit $limit";
$res_2 = mysql_query($sql_str);
while ($row=mysql_fetch_array($res_2))
{
if (strlen($row["chat_name"])<=20)
{
$chat_name = $row["chat_name"];
}
else
{
$chat_name = substr($row["chat_name"],0,17)."...";
}
$chat_mes = $row["chat_mes"];
$chat_time = $row["chat_time"];
$chat_ip = $row["chat_ip"];
echo "<tr><td><font color='#808080' style='font-size: 8pt; font-family: Arial'>$chat_time : $chat_ip</font></td></tr>";
echo "<tr><td><font color='#000000' style='font-size: 8pt; font-family: Arial'><b>$chat_name:</b></font> <font color='#000080' style='font-size: 8pt; font-family: Arial'>$chat_mes</font></td></tr>";
}
echo "</table>";
?>