Hi all, First off thanks to Charles and Offer for there help. Err, the spelling should have been the same :-) Silly error, done in haste. Anyway I fixed it all up but it still doesn't work! :-(. I sliced it up to a test page and played with it but I still can't get the darn thing working. Oh and Charles the code does have white space I don't know why the mailer sent it that way. Fingers crossed that the code below comes out right!
Here is the test page: <!-- test.tmpl.htm --> <!-- This form must return a NAME attribute='rm' with a VALUE attribute = 'mode_1 or 'mode_2' or 'mode_3'. --> <html> <head> </head> <body> <form method="post" action="/cgi-bin/TestBed/test_main.cgi"> *Project:<input type="text" size="100" name="html_projectname" value="<TMPL_VAR NAME="html_projectname">"><br> *Date Listed:<input type="text" size="20" name="HTML_DateListed" value="<TMPL_VAR NAME="HTML_DateListed">"><br> *Resp. Officer:<input type="text" size="20" name="HTML_RespOfficer" value="<TMPL_VAR NAME="HTML_RespOfficer">"><br> Area Mgr:<input type="text" size="20" name="HTML_AreaMgr" value="<TMPL_VAR NAME="HTML_AreaMgr">"><br> Technology:<input type="text" size="20" name="HTML_Technology" value="<TMPL_VAR NAME="HTML_Technology">"><br> Priority:<input type="text" size="20" name="HTML_Priority" value="<TMPL_VAR NAME="HTML_Priority">"><br> Area:<input type="text" size="20" name="HTML_Area" value="<TMPL_VAR NAME="HTML_Area">"><br> status:<select name ="<TMPL_VAR NAME="HTML_Status">"> <option value = "<TMPL_VAR NAME="HTML_Status">" selected> <tmpl_var name="HTML_Status"> <option value="Open">Open <option value="Pending">Pending <option value="Closed">Closed </select><br> Fault Source:<input type="text" size="20" name="HTML_FaultSource" value="<TMPL_VAR NAME="HTML_FaultSource">"><br> Fault Source Contact:<input type="text" size="20" name="HTML_FaultSourceContact" value="<TMPL_VAR NAME="HTML_FaultSourceContact">"><br> <!--*Project Description:<textarea name="HTML_ProjectDescription" rows="4" cols="100" wrap><tmpl_var name="HTML_ProjectDescription"><br> --> <input type="hidden" name="caller" value="editproject"> <input type="hidden" name="rm" value="mode_5"> <input name="submit" type="submit" value="Add Project"> <br> * denotes a manditory field </body> </html> All the code does is read in the data and then sent it back to the page. All the other textboxs work except for you know who! Anyway here is the code that I process this with sub insertproject { my $self = shift; # get the passed parameters. my $q = $self->query(); # get acopy of the CGI object. my $dbh = $self->param('mydbh'); # get the database handle. ## Construct the SQL Statement # Get the values from the form. # my $HTML_OCLRef = $q->param("HTML_OCLRef"); # my $HTML_ProjectID = $q->param("HTML_ProjectID"); my $HTML_RespOfficer=$q->param("HTML_RespOfficer")||undef; my $HTML_ProjectName=$q->param("html_projectname")||undef; my $HTML_DateListed=$q->param("HTML_DateListed")||undef; my $HTML_ProjectDescription=$q->param("HTML_ProjectDescription")||undef; my $HTML_Priority=$q->param("HTML_Priority")||undef; my $HTML_Status=$q->param("HTML_Status"); my $HTML_AreaMgr=$q->param("HTML_AreaMgr")||undef; my $HTML_Technology=$q->param("HTML_Technology")||undef; my $HTML_Area=$q->param("HTML_Area")||undef; my $HTML_FaultSource=$q->param("HTML_FaultSource")||undef; my $HTML_FaultSourceContact=$q->param("HTML_FaultSourceContact")||undef; #my $HTML_DateCompleted=$q->param("HTML_DateCompleted")||undef; # Setup the template to use for the output. my $template = $self->load_tmpl('test2.tmpl.htm'); #set up the data to give to the HTML template.... #$template->param(HTML_ProjectID => $row->{ProjectID}); #$template->param(HTML_OCLRef => $row->{OCLRef}); $template->param(HTML_RespOfficer => $HTML_RespOfficer); $template->param(HTML_ProjectName => $HTML_ProjectName); $template->param(HTML_DateListed => $HTML_DateListed); $template->param(HTML_ProjectDescription => $HTML_ProjectDescription); $template->param(HTML_Priority => $HTML_Priority); $template->param(HTML_Status => $HTML_Status); $template->param(HTML_AreaMgr => $HTML_AreaMgr); $template->param(HTML_Technology => $HTML_Technology); $template->param(HTML_Area => $HTML_Area); $template->param(HTML_FaultSource => $HTML_FaultSource); $template->param(HTML_FaultSourceContact => $HTML_FaultSourceContact); #$template->param(HTML_DateCompleted => $HTML_DateCompleted); # Output the template... $template->output; } I don't see why this doesn't work, but I have been frustrated like this before with this type of code (HTML::Template) where code that should work just doesn't then all of a sudden it does! For now reason that I can see or duplicate! I'm starting to this is a really dodgy module. Cheers Mick -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>