Im currently getting with this issue, send same object data ( model : User) from many pages to 1 one page, not same time. But how can I recognize which object that has been sent from which page? For example: I have 2 pages called: page1.php and page2.php that will send data of model User to main.php. But in the controller which contain main.php, there is only one way I know is isset($_POST[‘User’]) to check the exist of the model USer that has been sent, could not know it is sent from page1 or page2. I have one solution is pass one more variable so called $page. So I will check that if $page = page1, the data will be processed and be sent back to page1. However, I dont think it’s good idea when there are many pages more than 2 pages, and i’m looking for a more convenient solution by using Yii style . Anyone have ideas about it?
It worked correctly, but I’m not satisfied with this. As these code above, you can see that main.php retrieve 2 User model objects, but without the $page, cannot know where is this from. In php, I can name the variable like:page1_input then send it. Then get it with (isset($_POST[‘page1_input’]) and I know which ones send it.