Hi Boston PM,

 

I'm using CGI and HTML-Template for a web project (to allow user to
update info for a database record). Here is a sample code snippet from
the cgi script and the template.

 

# from cgi script

My $t=HTML::Template->new(filename=>'/path_to_template_file');

$t->param(fname=>$name_retrieved_from_database); # 'Scott'

$t->param(project=>$project_number_retrieved_from_database); # 'Project
2'

$t->param(comment=>$comment_retrieved_from_database); # 'project on
track'

 

# from template

<input type="text" name=""fname" value="<tmpl_var name="fname">">

<select name="project">

   <option value="project_1">Project 1</option>

   <option value="project_2">Project 2</option>

   <option value="project_3">Project 3</option>

</select>

<textarea name="comment" value="<tmpl_var name="comment">"></textarea>

 

The text field 'fname' worked as expected (displaying 'Scott' in the
text box). But the other two fields didn't show the assigned values. Can
someone tell me what I goofed? Any insight is greatly appreciated.

 

Thanks!

 

Bob Xiong

 


_______________________________________________
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to