Error: Please enter your nickname."; } else if ($message == "") { echo "Error: No message to be sent."; } else if ($mlen > $max_length) { echo "Error: Message too long."; } else { $db = mysql_connect($db_host,$db_user,$db_pass); mysql_select_db($db_name) or die("Cannot connect to database"); mysql_query("INSERT INTO shoutbox(name,ip,message,date) VALUES('$name','$ip','$message','$date')"); mysql_close($db); } } $db = mysql_connect($db_host,$db_user,$db_pass); mysql_select_db($db_name) or die("Cannot connect to database"); $query = "SELECT * FROM shoutbox ORDER BY id DESC LIMIT $dmessage"; $result = mysql_query($query); echo "
\n"; echo "\n"; echo "
\n"; mysql_close($db); ?>
Nickname:

Message:
:) :D ;) :( :O :P :S :roll: ;( :@