Well you need some sort of database, since it sounded like you want the data to still be there if you navigate away from the page in your browser. What type of storage depends on your needs. For example, do you want these messages to appear for everyone who views this webpage, or should they only see the ones they've posted?
If it's the former, I'd say a SQL database (e.g. SQLite if a full-fledged DBMS isn't "allowed") would be a good solution. Otherwise, you could just dump each POST'ed value into a text file on the server, using some sort of separator value between each message after ensuring that either a) you don't allow that separator value to appear in the POST'ed data, or b) you escape that value in some way if it does appear.
If it's the latter, then you could always use some form of the web storage built into modern day browsers.
EDIT: You'll also want to be more specific in what is not "allowed", since a database is nothing more than a collection of data stored for later use, so your question doesn't make sense if that isn't allowed ("How do I display a collection of data in a <div>? Note that collections of data are not allowed to be used.").