hey jeg har den her shoutbox men jeg vil godt have smillies med i det men hvor skal jeg sæte include ind ?? i denne her kode ??
[pre]
<?php
$db_host = "localhost";
$db_user = "gois_dk";
$db_password = "pass";
$db_name = "gois_dk";
if($_POST['submit']) {
if(!$_POST['author']) {
echo 'fejl ! : ik nogen navn';
die;
}
if(!$_POST['email']) {
echo 'Error ! : ik nogen email ';
die;
}
if(!$_POST['message']) {
echo 'fejl ! : ik nogen besked';
die;
}
$message = strip_tags($_POST['message'], '');
$email = strip_tags($_POST['email'], '');
$author = strip_tags($_POST['author'], '');
$message_length = strlen($message);
$author_length = strlen($author);
if($message_length > 150) {
echo "Error ! : din besked var for lang, din besked må ik være mere end 150 ord";
die;
}
if($author_length > 150) {
echo "Error ! : dit navn var for langt , dit navn skal være mindre end 150 ";
die;
}
mysql_connect($db_host,$db_user,$db_password) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());
$date = date("h:i A dS M");
$query = "INSERT INTO shoutbox (message, author, email, date, ip)
VALUES ('$message','$author','$email','$date','$_SERVER[REMOTE_ADDR]')";
mysql_query($query);
mysql_close();
echo "tak for din besked";
echo "<A HREF=\\"shoutbox.php\\">se hvad der står i shoutboxsen</A>";
} else {
mysql_connect($db_host,$db_user,$db_password) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());
$query = "SELECT message, author, email, date, ip
FROM shoutbox order by id DESC LIMIT 10";
$result = mysql_query($query);
echo "<TABLE>";
while($r=mysql_fetch_array($result))
{
echo "<TR>
<TD><font size='2'>
Posted $r[date] by <A HREF=\\"mailto
r[email]\\">
$r[author]</A></font></TD>
</TR>
<TR>
<TD><font size='2'>$r[message]</font></TD>
</TR>
<TR>
<TD><HR></TD>
</TR>";
}
echo "</TABLE>";
?><style type="text/css">
<!--
body {
background-color: #595959;
}
-->
</style>
<FORM METHOD=POST ACTION="shoutbox.php">
<TABLE>
<TR>
<TD>navn :</TD>
<TD><INPUT TYPE="text" NAME="author"></TD>
</TR>
<TR>
<TD>Email :</TD>
<TD><INPUT TYPE="text" NAME="email"></TD>
</TR>
<TR>
<TD>besked :</TD>
<TD><INPUT TYPE="text" NAME="message"></TD>
</TR>
<TR>
<TD> </TD>
<TD><INPUT TYPE="submit" name="submit" value="send "></TD>
</TR>
</TABLE>
</FORM>
<?php
}
?>
[\\pre]
[Redigeret d. 18/04-04 20:39:50 af gois][Redigeret d. 19/04-04 18:51:50 af gois]