You can access the POST data from your controller at

$this->data

As you can see from your pastes the $this->data array contains the values you posted from your form. I assume you have a Post model.

So, if you wanted to access your data, all you need to do is access the $this->data array

$this->data['Post']['id'] will hold the id of your post.

If the submission already contains the values you want to use to update your DB row all you need to do is a call to

$this->Post->save($this->data);

On 6/20/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:

Thanks to everyone in advance. I am trying to load a specific field
from a table based upon a specific id # (primary key) into a text box.
Upon submissions i want to update that specific field based upon that
specific id#. What i am not understanding is how to get the data after
the post. It seems like after post it creates a new array called
[form]?? How do i access this and line up the data to save it?


Thanks again



BEFORE FORM POST
(
    [controller] => post
    [action] => edit
    [pass] => Array
        (
            [0] => 1
        )

    [form] => Array
        (
        )

    [url] => Array
        (
            [url] => /post/edit/1
        )

    [bare] => 0
    [webservices] =>
    [data] => Array
        (
            [Post] => Array
                (
                    [id] => 1
                    [title] => aaaa
                    [body] => zzzzzzzzzzzzaaaa
                    [created] => 2006-06-15 21:54:22
                    [modified] => 2006-06-19 23:56:42
                )

        )

)





After FORM POST

(
    [controller] => post
    [action] => edit
    [form] => Array
        (
            [data] => Array
                (
                    [Post] => Array
                        (
                            [id] => 1
                            [title] => qqqqqqqqqqqq
                            [body] => qqqqqqqqqqq
                        )

                )

        )

    [data] => Array
        (
            [Post] => Array
                (
                    [id] => 1
                    [title] => qqqqqqqqqqqq
                    [body] => qqqqqqqqqqq
                )

        )

    [url] => Array
        (
            [url] => /post/edit
        )

    [bare] => 0
    [webservices] =>
)



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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