Re: [Cppcms-users] Loading data into forms
Brought to you by:
artyom-beilis
From: Marcel H. <ke...@co...> - 2012-01-31 08:29:55
|
There is a tutorial about forms and about databases. Combine them and you are fine (: the way you do is fine. But make sure to validate the data. Read these articles for further use http://cppcms.com/wikipp/en/page/secure_programming http://cppcms.com/wikipp/en/page/ref_cppcms_forms http://cppcms.com/sql/cppdb/ There are some very good examples. You can help by adding and editing them. Cheers, Marcel Hellwig ele...@ex... schrieb: Hi, I've just recently started experimenting with cppcms and so far I quite like it. (thanks!) I've been studying the message board code in the examples section to get my head around things and at the same time developing a simple blog application. My question is this - what is the best way to load data from database into a typical edit form, make it available for user to edit and submit changes? One way I think I could do it is simply cpdbb::result >> user.id >> user.name >> user.title etc and then copy the values into the members of the form struct. Is this the preferred way or is there another? Should this be done in the controller or elsewhere? Thanks, Petr _____________________________________________ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _____________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |