upload image on the Yii site

Hello, I’m new with Yii 1.1. I have 2 tables, postimage and post. I need to upload images on the page where I add posts. Table postimage has row post_id that is connected to id in the post table. I tried to find solution in internet but only that I found is to create row in the post table and upload pictures in the same table with the content but I need to upload posts and postimages in different tables but on the one page