Based on your question, I strongly suggest you use bake to generate a
basic foundation of code to get you started:

http://book.cakephp.org/view/113/code-generation-with-bake


On May 21, 8:03 am, vishal <[EMAIL PROTECTED]> wrote:
> Hi friends,
>               I am new on this forum.can anybody help me regarding
> following issue.
>
> I place a drop down in my view file as :
>
> <? echo $form->select('messageto', $options=array(), null, array(), '--
> select member--'); ?>
>
> I want to fills this drop down from my another table (user table)
>
> i.e i want to fill it dynamically from database table.
>
> The controller page is :
>
> <?php
> class MessagesController extends AppController {
>
>         var $name = 'Messages';
>         var $layout='user';
> function add() {
>
>                         if (!empty($this->data)) {
>                         if ($this->Message->save($this->data)) {
>
>                                 $this->flash('Your Message has been 
> saved.','http://192.168.0.60/
> vishal/cake_1.2.0.6311-beta/app/messages/index');
>                         }
>
>                 }
>         }
>
>         function edit($id = null) {
>         $this->Message->id = $id;
>         if (empty($this->data)) {
>                 $this->data = $this->Message->read();
>         } else {
>                 if ($this->Message->save($this->data['Message'])) {
>                         $this->flash('Your Message has been updated.', 
> array('action' =>
> 'index'));
>                 }
>         }
>
> }
> }
>
> This will store the data in messages table.....But in messageadd view
> page , i want to fill the drop down from user table. so any body help
> me regarding that...
> I shall be highly thankful to you..!!!!!!!
>
> vishal
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to