Jeremy,

Thanks for the tip that works perfectly.





On Dec 17, 11:10 pm, Jeremy Burns <jeremybu...@me.com> wrote:
> Cake can handle this quite nicely (and invisibly too). Add a datetime
> field called 'created' to your users table - and that's about it
> really. Don't include it in the add form. Cake will detect it (make
> sure you turn debugging to 2 at least once to make sure the model
> cache is refreshed to include the new field) and timestamp it on
> insert. The same applies for any table, not just users. You can also
> add a datetime field called 'modified', which will be updated whenever
> a record is changed.
>
> See this page for more 
> details:http://book.cakephp.org/view/330/Creating-the-Blog-Database
>
> You can also pick up the id of the user creating or modifying a
> record. For more details download this book 
> (http://www.pseudocoder.com/free-cakephp-book) from Matt Curry (which is a
> good read anyway) and refer to page 20.
>
> On Dec 17, 8:00 pm, Foroct <forrestfraz...@gmail.com> wrote:
>
> > I am working on my first cakePHP site and came across an issue I cant
> > quite figure out.  I have a registration form that a user fills out to
> > become a member.  I want to capture the time they fill out the form so
> > I added a date_added field in my database.  In the form the field
> > would normally be called as so echo $form->input('date_added'); but I
> > wanted it hidden so I did this echo $form->hidden('date_added'); which
> > for some reason returns all 0's in the timestamp.  Then I was thinking
> > that even if I did get it to pass the current time a user could just
> > edit that to change their date added.
>
> > So the question is, how do I pass a timestamp without the user seeing
> > it and without the user being able to edit it?
>
> > Thanks!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to