You want $this->data not $this->User->data. The data hasn't been
handed to the User model at that point. Try this and you'll see how
the data comes in to the controller:

function submit()
{
  debug($this->data);exit;
  ...
}

On Wed, Mar 5, 2008 at 2:12 PM, Manu0310 <[EMAIL PROTECTED]> wrote:
>
>  Hi I have a controller which makes use of a model
>
>  var $uses = array('User','User_posts');
>
>  In my controller I have a function called submit which is used for a
>  form where users can post data to.
>  looks like this: (I abbreviated it but thats the idea)
>
>  function submit()
>  {
>         if (!empty($this->User->data))
>         {
>                 echo "datafrom form received";
>                 $this->set('submitted','true');
>         }
>
>  }
>
>  now I have a view under users/submit which has a form in it: (Again
>  abbreviated)
>
>  <form id="UserPostsForm" method="post" action="/users/submit"
>  style="margin:0;" name="UserPostsForm" >
>
>  <input id="User_postslink" name="data[User_posts][link]" type="text"
>  size="50" class="default_font" style="border:1px solid #CCCCCC; width:
>  375px;" />
>
>  </form>
>
>  Whenever I submit this form it seems to never be passing the data to
>  my controller. I am thinking it may be an issue with this being a
>  model I use in a controller and not the main model "users".
>
>  Any help is appreciated, I have been stuck on this for about 5 hours
>  now.
>
>  Thanks.
>  >
>

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to