View Single Post
  #1 (permalink)  
Old January 5th, 2007, 10:37 AM
mercury7 mercury7 is offline
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch 7. Problems with Updating using GenericObject

Hi All

Am looking to use the GenericObject class within a web-application but have a problem with how to use it to update database fields.

Assuming I can pre-populate a user-form from the data loaded by instantiating an object of the class, how can I then use the SetField method dynamically? ie. to pass any changed values back to the $database_fields member variable ready to be saved to the database.

I'm not fully clear on the workings of classes generally but it seems to me that using a form will action to a new page & hence a completely new object, as will using php_self to recall the same page.

In either case it seems strange having an object that allows an update only if the update value is hard-coded into the script.

Anyone have any thoughts (& preferably a solution :-) on this subject?


Thanks

Mark