Tagwall [/link]
Hey folks..Jeg har et tagwall script..
<head>
<link rel="stylesheet" type="text/css" href="style/main.css">
<style type="text/css">
.textfield {border: 1px solid #000000; font-family: Verdana; font-size: 10px; background: #DCCDE2; color: 000000;}
</style>
</head>
<table border="0" width="100%">
<tr>
<td width="400">
<form action="<? echo $php_self ?>" method="post">
<input type='text' valign="top" value='Name' name='name' onfocus="if(this.value=='Name')this.value='';"
onblur="if(this.value=='')this.value='Name';" size=15 maxlength='20' STYLE="font-family: verdana; font-size: 11px;
background-color: #FFFFFF;
border: solid #000000 1px">
<br>
<INPUT TYPE='TEXT' valign="top" value='Message' NAME='message' SIZE=30 onfocus="if(this.value=='Message')this.value='';"
onblur="if(this.value=='')this.value='Message';" maxlength='300' STYLE="font-family: verdana; font-size: 11px;
background-color: #FFFFFF;
border: solid #000000 1px">
<br><br>
<input type="submit" valign="top" name="submit" value="Send" class="textfield"> <br>
<a href="viewall.php"><font size="1">Show all..</font></a>
</form>
</td>
<?
//the host, name, and password for your mysql
mysql_connect("####","####","####");
//select the database
mysql_select_db("####");
if($submit)
{
//use the PHP date function for the time
$time=date("j-M-Y");
// inserting it into the shoutbox1 table which we made in the mysql statements before
$result=MYSQL_QUERY("INSERT INTO shoutbox1 (id,name,message,time)".
"VALUES ('NULL','$name', '$message','$time')");
}
?>
<?
//returning the last 20 messages
$result = mysql_query("select * from shoutbox1 order by id desc limit 20");
//the while loop
while($r=mysql_fetch_array($result))
{
//getting each variable from the table
$time=$r["time"];
$id=$r["id"];
$message=$r["message"];
$name=$r["name"];
?>
</td>
<td> </td>
</tr>
</table>
<br>
<table border="0">
<tr>
<td width="200"><font size="1"><b>Name: <? echo $name ?> </td>
<td width="110"><font size="1"><b>Date: <? echo $time ?></td>
</tr>
<tr>
<td colspan="3">
<? echo $message ?>
<? } ?>
</td>
</tr>
</table>
Jeg kunne godt tænkt mig at få lave så man kan skrive
[link]http://hjemmeside.com"]babababa[/link] istedet for at skrive <a href="http://hjemmeside.com" target="blank">bababababa</a>...
Er det noget der kan lade sig gøre??
