Did you try to run the program from the command line to see if you can figure out where your error(s) are? Make sure you use carp (if you already are not doing so), as in:
use CGI::Carp qw(fatalsToBrowser);
This should at least help you troubleshoot without being blind to the trouble. Keep at it, you are almost there. | [reply] [d/l] |
Hi,
Yes, I'm already using the Carp statement. Unfortunately, I'm not receiving a clearer error message.
I'm not quite sure how to run it from the command line. I'm new at this stuff. Can you tell me how?
Thanks
| [reply] |
It must be the print statement that is now being executed.
I can't explain the error but if you want the links at the bottom of the page you can't print them inside the sub. I suggest you add them onto the page returned like this ; @nav_link = map { "[$_]\n" } @nav_link;
$page .= "<hr>@nav_link";
return ($page);
poj
| [reply] [d/l] |
Hi Poj,
Thanks for the help. I used your suggestion and now the links do appear on the page.
I seemed to have another problem. When I click the link for page 2, it brings me back to my search page instead of showing me the next two items. I think this might be caused in the subroutine gen_nav_link. At the same time, the code in this subroutine looks ok to me.
Any thoughts on why when I click the Next page or Page 1 links, it brings me back to the search page?
Thanks for your help.
| [reply] |
Looking at the code on you scratchpad, doesn't the search routine use a parameter called 'keywords' rather than 'description' ? Here ;
my $val = WebDB::trim (param ("keywords"));
poj | [reply] [d/l] |