mysql_query where?
shoutbox_post.php?
or shoutbox.php?
And what would it look like?
mysql_query("SELECT * FROM users");
or
mysql_query("SELECT * FROM chatroom");?
I just thought I'd point out that using AJAX polling to create a chatroom definitely isn't the best option... If you're using a free web host they will surely shut you down immediately. A new connection would be established every X seconds and the lag would be incredible.