What URL are you trying to access?

Does your form action have the ID in it?

<form action="/vlogs/add/<?=$id?>" method="post"> ..

?

-- John

On May 9, 2006, at 9:47 AM, Dusty wrote:

>
> John,
>
> Thanks for the help !!  Basically I have already tried that
> and for some reason I get the warning "missing argument for add()
> in ..../vlogs_controller.php.  So I must be doing something wrong
> or not have something set up correctly.  For some reason it doesn't
> see the $id variable being passed to it.  I have pasted the code for
> the
> vlogs_controller.php below.  If I un-comment the line:
>  //$this->params['data']['Vlog']['vehicle_id'] = '2'  ;
> everything works ok and a record is inserted with the vehicle id =  
> "2".
>
>       function add($id)
>       {
>               if (empty($this->params['data']))
>               {
>                       $this->render();
>               }
>               else
>               {
>                   $this->params['data']['Vlog']['vehicle_id'] = $id  ;
>                   //$this->params['data']['Vlog']['vehicle_id'] = '2'  ;
>
>               $this->Output->filter($this->params['data']);
>                       $this->Sanitize->cleanArray($this->params['data']);
>
>                       if ($this->Vlog->save($this->params['data']))
>                       {
>                               $this->flash('Your log has been 
> saved.','/vlogs');
>                       }
>                       else
>                       {
>                               $this->set('data', $this->params['data']);
>                               $this->render();
>                       }
>               }
>       }
>
> --thanx again
> --dusty
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to