In thoery, would this work?
<form name="eventadd" method="post" action="eventadd.php">
<textarea name="lineup" cols="50" id="lineup" scroll="no" style="background-color: transparent"></textarea>
<input type="submit" value="Post Event">
</form>
<input value="red" type="button" onclick="eventadd.lineup.value=eventadd.lineup.value + '[ color=red ][ /color ]'">
I know the above code works, now here is where I am not sure, above we send the data to eventadd.php, without the spaces in the [ ] of course π
$query = mysql_query("INSERT INTO events (lineup)
VALUES ('$lineup')");
ereg_replace('[ color=red ]', '<font color=red>', $query);
ereg_replace('[ /color ]', '</font>', $query);
ereg_replace('\n', '<br>', $query);
mysql_query($query);
Would this convert my bb code to HTML tages properly?
Thank you everyone that provides me with information, in advance. π