Yii Framework Forum: Tolong bantuin saya di yii - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Tolong bantuin saya di yii Rate Topic: -----

#1 User is offline   kecil_RI 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 23-February 12

Posted 01 June 2012 - 07:58 AM

tolongin saya donk...
saya lagi pengen bikin tugas..
bikin php nyoba pake yii

nah gini saya ada model 3, pengirim,penerima,barang..
alurnya kita isi _form pengirim trus klo di create langsung ke _form penerima klo di create lagi langsung ke barang dan di barang udah ada nama pengirim dan nama penerima tanpa di input lagi

klo ada yang bisa tolong bantuin..

terima kasih bantuannya
0

#2 User is offline   J.J 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 126
  • Joined: 01-April 11

Posted 01 June 2012 - 09:12 PM

View Postkecil_RI, on 01 June 2012 - 07:58 AM, said:

tolongin saya donk...
saya lagi pengen bikin tugas..
bikin php nyoba pake yii

nah gini saya ada model 3, pengirim,penerima,barang..
alurnya kita isi _form pengirim trus klo di create langsung ke _form penerima klo di create lagi langsung ke barang dan di barang udah ada nama pengirim dan nama penerima tanpa di input lagi

klo ada yang bisa tolong bantuin..

terima kasih bantuannya


Agan uda buat sampe mana ? Saran saya agan coba buat dulu aja, kl ada kesulitan, silakan post dimari.
0

#3 User is offline   kecil_RI 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 23-February 12

Posted 02 June 2012 - 01:31 AM

View PostYosua, on 01 June 2012 - 09:12 PM, said:

Agan uda buat sampe mana ? Saran saya agan coba buat dulu aja, kl ada kesulitan, silakan post dimari.



abis isi _form pengirim di save langsung ke _form penerima dengan id_pengirim udah ada di _form penerima itu gimana?
0

#4 User is offline   y_i_i 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 38
  • Joined: 26-March 12

Posted 14 June 2012 - 10:12 AM

field yang di tabel pengirim ama penerima sama semua ? atau cuma id doank yang sama? klo cuma id doank kirim value lewat add bar nyah ajah,, pake $_REQUES,, klo sama semua coba pake before save atw after save,,
0

#5 User is offline   mhdrasad 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 197
  • Joined: 20-April 11
  • Location:Bumi Indonesia

Posted 15 June 2012 - 04:30 AM

View Postkecil_RI, on 02 June 2012 - 01:31 AM, said:

abis isi _form pengirim di save langsung ke _form penerima dengan id_pengirim udah ada di _form penerima itu gimana?


public function actionCreatePengirim(){
//..source masukin nilai ke field code bla..bla..bla
if ($modelpengirim->save()){ //disini save
$getidpengirim = Yii::app()->db->getLastInsertId; //ambil last id klo gak salah gini , ma'ap klo salah . lupa saya :P
$this->redirect(array('createpenerima','idpeng'=>$getidpengirim)); //redirect ke view pengirim
}
$this->render('halamanFormPengirim')//klo tidak terjadi post ya kesini
}

public function actionCreatePenerima($idpeng){
//... source masukin nilai ke field code bla..bla..bla
$modelpengirim->idpengirim = $idpeng;
if ($modelpengirim->save()){
$getidpenerima = Yii::app()->db->getLastInsertId;
$this->redirect(array('halamanbarang','idpeng'=>$idpeng,'idpen'=>$getidpenerima)); //redirect ke view pengirim
}
$this->render('halamanFormPenerima')//klo tidak terjadi post ya kesini
}

public function actionHalamanBarang($idpeng,$idpen){
//setelah dapet idpengirim dan idpenerima , selanjutnya terserah anda
}


ma'af nih gan ane nge flood , sok taunya ane aja ini mah... piss :D
Wait For True Concept or Finish it With Coding Concept .
#chadnox
0

#6 User is offline   ahmadroni 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 250
  • Joined: 14-June 09
  • Location:Yogyakarta-Indonesia

Posted 15 June 2012 - 08:47 PM

udah solve kah nih problem??
Hospital Cost Management System and
Hospital Management Information System
0

#7 User is offline   zykapratama 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 13-January 11
  • Location:Indonesia

Posted 17 January 2013 - 02:24 AM

View Postkecil_RI, on 01 June 2012 - 07:58 AM, said:

tolongin saya donk...
saya lagi pengen bikin tugas..
bikin php nyoba pake yii

nah gini saya ada model 3, pengirim,penerima,barang..
alurnya kita isi _form pengirim trus klo di create langsung ke _form penerima klo di create lagi langsung ke barang dan di barang udah ada nama pengirim dan nama penerima tanpa di input lagi

klo ada yang bisa tolong bantuin..

terima kasih bantuannya


sebelum di generate, di databasenya di kasih foreign keys tiap table mas bro...

happy coding
0

#8 User is offline   deory pandu 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 14-January 13

Posted 22 January 2013 - 04:22 AM

udah sampek mana nih??
udah selesai ya??
pertanyaannya balum begitu jelas nih
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users