Re: Error when submitting form to a controller using different model name

2008-12-08 Thread Tony

Yeah I had the correct controller. What happened is that I didn't pass
a variable I was using within the default.ctp into the action. This
caused a bunch of errors.

The second thing I didn't do is that I wasn't using the html and
JavaScript helpers to include the CSS and JavaScript files correctly
and that was causing the layout error.

Once I fixed that everything worked out just fine.

- Tony

On Dec 7, 9:42 pm, thatsgreat2345 [EMAIL PROTECTED] wrote:
 Do you have a controller called businesses_controller.php and in that
 a function called thank_you?

 On Dec 7, 9:37 pm, Tony [EMAIL PROTECTED] wrote:

  I'm in the process of creating a website that is for my affiliates and
  their information is stored into a model called 'User' and I have a
  controller called businesses with two actions;  index and thank_you.

  When a prospect lands onto the page they are given a sales letter and
  a form to fill out. This form will use the User model but I want it to
  submit to the businesses thank_you action.

  I'm putting the prospects information into the Users model because
  they could be converted into an affiliate.

  Where I'm having the problem is that currently my form code looks like
  this:

  ===CODE===
  echo $form-create('User', array('url' = '/businesses/thank_you'));
  echo $form-hidden('parent_id', array('value' = $member['User']
  ['affiliate_number']));
  echo 'span class=required*/span spanName:/span';
  echo $form-input('first_name', array('label' = false, 'size' =
  20));
  echo 'span class=required*/span spanEmail:/span';
  echo $form-input('email', array('label' = false, 'size' = 20));
  echo 'br /';
  echo 'spanstrongPhone: em(optional, for those who really want
  change)/em/strong/spanbr /';
  echo $form-input('phone', array('label' = false));
  echo 'br /';
  echo $form-end(array('label' = 'I Want Change in My Life'));
  ===CODE===

  The problem is that when I submit this form the url at the top is
  correct:http://example.com/businesses/thank_you

  But I get this error:

  Not Found

  Error: The requested address '/businesses/thank_you' was not found on
  this server.

  What am I doing wrong here?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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
-~--~~~~--~~--~--~---



Re: Error when submitting form to a controller using different model name

2008-12-07 Thread thatsgreat2345

Do you have a controller called businesses_controller.php and in that
a function called thank_you?

On Dec 7, 9:37 pm, Tony [EMAIL PROTECTED] wrote:
 I'm in the process of creating a website that is for my affiliates and
 their information is stored into a model called 'User' and I have a
 controller called businesses with two actions;  index and thank_you.

 When a prospect lands onto the page they are given a sales letter and
 a form to fill out. This form will use the User model but I want it to
 submit to the businesses thank_you action.

 I'm putting the prospects information into the Users model because
 they could be converted into an affiliate.

 Where I'm having the problem is that currently my form code looks like
 this:

 ===CODE===
 echo $form-create('User', array('url' = '/businesses/thank_you'));
 echo $form-hidden('parent_id', array('value' = $member['User']
 ['affiliate_number']));
 echo 'span class=required*/span spanName:/span';
 echo $form-input('first_name', array('label' = false, 'size' =
 20));
 echo 'span class=required*/span spanEmail:/span';
 echo $form-input('email', array('label' = false, 'size' = 20));
 echo 'br /';
 echo 'spanstrongPhone: em(optional, for those who really want
 change)/em/strong/spanbr /';
 echo $form-input('phone', array('label' = false));
 echo 'br /';
 echo $form-end(array('label' = 'I Want Change in My Life'));
 ===CODE===

 The problem is that when I submit this form the url at the top is
 correct:http://example.com/businesses/thank_you

 But I get this error:

 Not Found

 Error: The requested address '/businesses/thank_you' was not found on
 this server.

 What am I doing wrong here?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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
-~--~~~~--~~--~--~---