PHP: display text and picture

Can someone give me a script in php to:

Connect to Mysql: DB= content TABLE = message

Enter text , about 3000 characters, and put a image either left or right, top or bottom or the text.

Please someone make me this script, ive spent several hours trying to figure it out.

Could you elaborate a wee bit more?