<?php
include("head.php");
$forumid = $_GET['forumid'];
if(empty($id)){
echo 'Please login';
}else{
?>
<b>New Topic</b><form method="post" action="addtopic.php">
<input type="hidden" value="<? echo $forumid; ?>" name="forumid"><br >
Title: <br />
<input type="text" name="title" ><br /><br />
<script>function add(text){document.new_thread.content.value += " "+text;}</script>
<a href="#" onclick="add('[b]Text to bold[/b]')">Bold</a>
<a href="#" onclick="add('[i]Text to italicate?[/i]')">Italic</a>
<a href="#" onclick="add('[u]Text to underline[/u]')">Underline</a>
<a href="#" onclick="add('[blink]Text to blink[/blink]')">Blinky</a>
<a href="#" onclick="add('[img]Text to blink[/img]')">Image</a>
<a href="#" onclick="add('[url='Site URL']Text to show[/url]')">Link</a> <br />
<a href="#" onclick="add(':lol:')"><img src="http://medialife.latestdot.net/blumoney/images/smi/hahaha.gif" border="0"></a>
</p>
Description<br />
<textarea name="content" rows="20" cols="40"></textarea><br />
<?
include("config.php");
$query = "
SELECT type FROM `users` WHERE username = '".$id."'";
$result = mysql_query($query) or die(mysql_error());
list($type) = mysql_fetch_row($result);
if($type == 'admin'){
echo '
<select name="type">
<option>normal</option>
<option>news</option>
<option>sticky</option>
</select>
';
}
?>
<input type="submit" value="Add a new topic"></form>
<?
}
include("foot.php");
?>
That was the code
but when i click on image or link nothing shows up in the box....
what am i doing wrong?