Php forum ting..
Hejsa hvad skal jeg skrive i den her kode for at fx :) bliver til en smiler.gif ? vil nemlig havde der skal være smileys i mit forum! her er koden<?
session_start();
include "../conn.php";
$res111 = mysql_query("SELECT * FROM crew WHERE navn = '$brugernavn'");
$cb = mysql_fetch_array($res111);
$tc = mysql_num_rows($res111);
if($dl == NULL){
header("location: ?dl=50");
}
else{
include "../top.txt";
overskrift("Forum");
?>
<font size=1 face=verdana>
<?
$res3 = mysql_query("SELECT * FROM forum");
$res1 = mysql_query("SELECT * FROM forum order by id desc limit $dl");
$antal = mysql_num_rows($res3);
?>
<b>
<script>
function update() {
parent.frame.location='<?=$PHP_SELF?>';
}
sminfe
function newmessage() {
parent.frame.location='ny.php';
}
function sminfe() {
parent.frame.location='sminfo.php';
}
</script>
<br>
<input type=submit value="ny besked" onclick="newmessage()"> - <input type=submit value="opdater forum" onclick="update()"> - <input type=submit value="smiley info" onclick=sminfe()">
</b><br><br>
Viser <?=$dl?> beskeder ud af <?=$antal?>.
<br><br><br>
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="49">
<?
if($antal == NULL){
echo "Der er ingen beskeder endnu";
}
while ($row = mysql_fetch_array($res1)){
$res11112 = mysql_query("SELECT * FROM brugere WHERE brugernavn = '$row[poster]'");
$sm = mysql_fetch_array($res11112);
$new = htmlspecialchars("$row[besked]", ENT_QUOTES);
$str = $new;
$ressmil = mysql_query("SELECT * FROM ownersmiley WHERE ejerid = '$sm[id]'");
while ($smiley = mysql_fetch_array($ressmil)){
$str = str_replace("$smiley[topic]", "<img src=\"smil/$smiley[gfx]\">", $str);
}
$res = mysql_query("SELECT * FROM brugere WHERE brugernavn = '$row[poster]'");
$brugerinfo = mysql_fetch_array($res);
$res11 = mysql_query("SELECT * FROM crew WHERE navn = '$row[poster]'");
$crewbruger = mysql_fetch_array($res11);
$tjekcrew = mysql_num_rows($res11);
?>
<tr>
<td width="100%" height="1" style="background-color: #c0c0c0">
<font size="1" face="Verdana">D. <?=$row[dato]?> tilføjede <?if($tjekcrew == "1"){?><font color="red"><?}?><b><a href=../brugersystem/profil.php?id=<?=$brugerinfo[id]?>><?=$row[poster]?></a></b><?if($tjekcrew == "1"){?></font><?}?> denne besked :
</font></td>
</tr>
<tr>
<td width="313" height="44" valign="top"> <font size="1" face="Verdana"><font color="<?=$brugerinfo[color]?>"><?if($tjekcrew == "1"){?><b><?}?> <?=$str?><?if($tc == "1"){?> - <a href=foradel.php?id=<?=$row[id]?>>Slet</a></b><?}?></font></td>
</tr>
<?
}
?>
</table>
</div><br>
<center>
<a href=?dl=<?=$antal?>>Vis alle beskeder</a></center>
<?
include "../bund.txt";
}
?>
Kan i sætte det ind så det er. Også lægge et svar ;)