Jonathan Stein wrote:
>
> In your controller, you can save your new invoice simply by calling
> "save" on the model (assuming your form is created with the
> FormHelper):
> $this->Invoice->save($this->data);
>
> - then the id of the newly created invoice will be available as
> $this->Invoice->id:mail('[email protected]', 'New order', 'Invoice id is: '
> . $this->Invoice->id);
> (or use the email component from Cake:
> http://book.cakephp.org/view/176/Email)
>
> For the view, try to take a look at the FormHelper - it will create
> the form for you (http://book.cakephp.org/view/182/Form).
>
Hello Jonathen, thanks for that reply. Here is what I have done so far:
For the Model:
http://www.nabble.com/file/p23709967/invoice.php invoice.php
For the Controller:
http://www.nabble.com/file/p23709967/invoices_controller.php
invoices_controller.php
Now this always gives me an error on line 4 saying expecting 'T_FUNCTION'
Where do I insert:
$this->Invoice->id:mail('[email protected]', 'New order', 'Invoice id is: ' .
$this->Invoice->id);
Thanks.
--
View this message in context:
http://www.nabble.com/Auto-Increment-ID-in-Form-tp23701450p23709967.html
Sent from the CakePHP mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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?hl=en
-~----------~----~----~----~------~----~------~--~---