Think about Loose Coupling | |
PerlMonks |
[Solved]: How to get only changed parameter names from CGI script on form submit?by Perl300 (Friar) |
on Nov 23, 2015 at 17:09 UTC ( [id://1148405]=perlquestion: print w/replies, xml ) | Need Help?? |
Perl300 has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I have dynamic webpage which on submit calls itself (a cgi script). There are multiple HTML text boxes on the form. On form submit all these form element names and their values (parameter names and values) are submitted to cgi script. I can get this entire list of parameter name and values using $query->Dump; Any change in these parameters will have to be updated in DB so I am running DB queries for each of those parameters which results in many DB queries being fired and slowing down the response on webpage. I can't run all the updates in single query as well due to some business logic. So what I am thinking is to run the queries only for those elements/parameters that have been changed. Is there any way to get list of only those parameters that have changed, so that I can run DB queries only for those parameters and not for all? Or any other better way to do it? Please forgive me if the description doesn't make it clear but I tried my best and can answer any other specific question to make it clearer.
Back to
Seekers of Perl Wisdom
|
|