|
Hello Everyone,
I would appreciate any assistance in
solving this problem. I'm still a new programming kiddo working on a
program to make my friends job easier, I don't wish to spend another
day working on it :-/. Can anyone tell me why the following doesn't work?
As you can see I print the keys and values and they do contain data, however,
when I attempt to access the data sent to the template it doesn't show anything,
here is the data in the updates hash.
keys:
shopperID q12a q12b q30a q30b q41a q41b q20 q16a q21 q16b q22 q23 q24 q25
q26 q27 q60 q28 rtime q62 q63 q64 q65 q66 q49a q68 q67a q49b q69 q49c q67b q49d
q49e rdate q9a q17a q9b q31 q17b q9c q9d q33 q9e q34 q9f q35 q9g q71a q36 q9h
q71b q37 q9i q70 q38 q9j q39 q1 q72 q2 q73 q3 q74 q57a q4 q75 q57b q5 q76 q6 q77
q7 q8 q78 q10a q10b q79a q79b q79c status q32a q32b q43a q40 q43b q61a q61b q42
q44 q29a q45 leasing_agent q29b q46 community q47 q80 q48 q81 stime q82 q83a
comments1 comments2 q83b q11 q13 q51a q14 sdate q51b q15 q50 q18 q19 q52 q53 q54
q55 q56 q58 q59
values:
1 1 erere 0 sadfsadf 1 1 1 dsdf 1 sdf 1 0 1 0 1 10:30:00 2002-10-12 0 1
When 0 asdfadfs No. Age 1 Pet 0 Children Up/Down Price Range Carpet Color
Furnished/Unfurnished 1 0 1 1 1 0 0 1 1 wre 0 1 sadfasdf 1 Karim Metallaoui
sdfdasf Tulsa Community College 00:00:00 adsfdsaf 0 1 0 0000-00-00 1 1 0
sub display_report
{
############################################################################### ## Displays the current report page, the page to display is passed ############################################################################### my @keys = keys(%updates);
print "@keys\n"; my @values = values(%updates);
print "@values\n"; print "<P>Start report
printing....";
my $file = $_[0]; my $vars = { "data" => %updates #i
tried " " this and not, don't know if it makes a diff *shrug*
};
my $template =
Template->new({
INCLUDE_PATH => '/usr/www/users/wassimk/projects/ds/templates', }); $template->process($file, $vars) || die
$template->error("Cant open file.");
exit;
}
In the template I'm trying to retrieve the data by
doing:
[% data.shopperID %]
[% data.q10a %]
etc... etc...
I've made sure that those keys I'm trying to get data from are
not empty. Again, I appreciate any help.
Thanks,
Wassim
|
- Re: [Templates] pass the hash please Wassim M.
- Re: [Templates] pass the hash please kktos
- Re: [Templates] pass the hash please darren chamberlain
