I've used the blog tutorial to help me create my first MVC called
mtypes

You can see it at: http://members.nzpif.org.nz/index.php/mtypes

I can list, view, add but I can't get edit to show. My host has the
.htaccess bug (waiting for upgrade) so I'm using the long names but
that's ok. This is for an intranet anyway.

Any ideas where I've gone wrong?

    function edit($id=null)
    {
        //if (empty($this->params['data']))
        if (empty($this->data['Mtype']))
        {
            $this->Mtype->id = $id;
            $this->params['data'] = $this->Mtype->read();
            $this->render();
        }
        else
        {
            //if ( $this->Mtype->save($this->params['data']['Mtype']))
                if ($this->Mtype->save($this->data['Mtype']))
            {
                $this->flash('The membership type has been
updated.','/index.php/mtypes');
            }
            else
                {
                    $this->validateErrors($this->Mtype);
                    //And render the edit view code
                    $this->render();
                }
        }
    }//edit


--~--~---------~--~----~------------~-------~--~----~
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