strik smiley ind i tagwall
Heysan allezusammen!!!Hvordan kan jeg skrive smileys ind i mit tagwall.? og gerne kunne tilføje bye med tiden :-)
<?
$connection = mysql_connect("localhost","user","kode");
mysql_select_db("database", $connection);
if($nick && $msg ) {
$nick = htmlentities($nick);
$msg = htmlentities($msg);
mysql_query("insert into tagwall(id, navn, msg, ip, hp)
values ('$hp','$nick','$msg','$REMOTE_ADDR','$hp')");
}
?>
<form action="<? $PHP_SELF ?>" method="post">
<table border="0" width="100%" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0" height="101">
<tr>
<td width="100%" height="16"><font color="000000" face="verdana" size="1">Name:</font></td>
<td width="100%" height="16" ></td>
</tr>
<tr>
<td width="100%" height="22"> <font size="2">
<input type="text" name="nick" size="25" maxlength="20" style="border: 1px solid #000000; font-family:Verdana; font-size:8 pt">
</font></td>
</tr>
<tr>
<td width="100%" height="16"><font color="000000" face="verdana" size="1">HP: <font color="red"> (without http://www.)</font></td>
<td width="100%" height="16" ></td>
</tr>
<tr>
<td width="100%" height="22"> <font size="2">
<input type="text" name="hp" value="NONE" size="25" maxlength="20" style="border: 1px solid #000000; font-family:Verdana; font-size:8 pt">
</font></td>
</tr>
<tr>
<td width="100%" height="37" valign="top"> <font color="000000" face="verdana" size="1">Tag:</font><font face="verdana" size="2"><br>
</font>
<textarea rows="4" name="msg" cols="24" style="border: 1px solid #000000; font-family:Verdana; font-size:8 pt"></textarea><font size="2">
</font></td>
</tr>
<tr>
<td width="100%" height="26"> <font size="2">
<input type="submit" value="Tag it" style="border: 1px solid #000000; font-family:Verdana; font-size:8 pt">
<input type="submit" class="button" style="border: 1px solid #000000; ; font-family:Verdana; font-size:8 pt" name="opdater" value="Update"></font><hr></td>
</tr>
</tabel>
</form>
<tr>
<td width="100%">
<?
$col0 = "";
$col1 = "";
$i=0;
if(empty($hp)) $hp = "NONE";
$result = mysql_query("select id, UNIX_TIMESTAMP(tid) AS tiden, navn, msg, ip, hp from tagwall order by id desc LIMIT 0, 13");
while($row = mysql_fetch_array($result)){
++$i;
$col = "col" . $i%2;
$tid = date("H:i:s", $row['tiden']);
$dato = date("j/m - Y", $row['tiden']);
echo "
<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; border-top: 1px solid #BBB5A5\" bordercolor=\"#111111\" width=\"100%\" height=\"1\">
<tr>
$row[navn] says:
<td width=\"65%\" valign=\"top\" height=\"1\">
<font face=\"Verdana\" size=\"1\">$row[msg]</td>
<td width=\"35%\" valign=\"top\" height=\"2\">
<font face=\"Verdana\" size=\"1\"><b>Written by: </b>$row[navn]<br>
<b>HP: </b> <a href=http://www.$row[hp]> $row[hp]</font></a><br>
<b>Date: </b>$dato<br></b>
<b>Time: </b>$tid<br>
<font face=\"Verdana\" size=\"1\"><b>IP: </b>$row[ip]<br></td>
</font></td>
</tr></table>
";
}
?>
