Guest User

Untitled

a guest
Nov 20th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. public function actionMyfavourite()
  2. {
  3. //$model = new favourite_video;
  4. //$this->render('myfavourite');
  5. $model = new favourite_video;
  6. if(isset($_GET["FavId1"]))
  7. {
  8. $myFavid1=array();
  9. $myFavid1=explode(',',$_GET["FavId1"]);
  10. $i=0;
  11. foreach($myFavid1 as $value)
  12. {
  13. $model=new myfavourite;
  14. $model->id=Yii::app()->user->id;
  15. $model->video_id=$myFavid1[$i++];
  16. $model->username=Yii::app()->user->id;
  17. $model->delete();
  18. }
  19. }
  20. $this->render('myfavourite');
  21. }
Add Comment
Please, Sign In to add comment