Reply to Tracking what has been changed

Your name:

Reply:


Posted by Robb Kerr on 05/05/05 02:28

Here's the scenario...

I am building a site in which users will be able to create and then later
edit personal information. When they edit their information, I need to keep
track of what was changed so that I can inform via email a person to
approve the changes. Here's the flow I'm considering...

When an UPDATE page is loaded, I build an array like...

$fields = array("table.field1" => value, "table.field2" => value,
"table.field3" => value)

I then plan to save this array to a SESSION variable. Then, when the form
is posted I save the new form contents to another SESSION variable. Then I
compare the two arrays and save the names of the fields changed to an array
saved in a third SESSION variable. Finally, when I build the email, I can
parse the changed fields array to inform the person who must approve the
changes.

First, does anyone have a suggestion of a better way to do this? Second, I
can't seem to save an array to a SESSION variable. I build the array in a
local variable and then set the SESSION variable equal to it. When I recall
the SESSION varialbe, it's contents is "Array". Then, when I print_r() the
SESSION variable, I still get "Array" as the contents. What's up?

Thanx in advance for any help.
--
Robb Kerr
Digital IGUANA

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация