kondap has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I have a problem in linking cgi scripts. I have a tree structure containing multiple nodes.(they are all links).I have a database for the links. By clicking on every link, a unique page will appear. On that page i would like to write some message alongwith the node from which the user has come(by displaying the previous link name). So, here I would like to use only one page for all the links. could you please help me in achieving this problem Thanks in advance. prabhakar konda. pkonda@rediffmail.com

Replies are listed 'Best First'.
Re: linking
by tachyon (Chancellor) on Jul 04, 2001 at 16:06 UTC
Re: linking
by Chady (Priest) on Jul 04, 2001 at 14:59 UTC

    Your question is being too vague and it already answers itself.

    No hint as for what is the problem here, and you said "...could you please help me in achieving this problem ..." so as you can see, you achieved the problem, now we must also achieve it, in order to be able to help you achieve the solution.

      some hints:
    • did think about the structure of Perlmonks, and the node_id and lastnode_id params?
    • do you think you can arrange all the links in a dispatch table? or they must grow up and should come up from the database? which also can be made into a dispatch table..
    • did you do some code you can show us here?? using <code> tags

    He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

    Chady | http://chady.net/
Re: linking
by mattr (Curate) on Jul 04, 2001 at 16:28 UTC
    Okay I am quite confused with your question..

    I think you are saying that you have made many Perl program files, each to print only one page each when called from a browser, including hypertext links to one or more of these other program files, as if navigating a menu system or a text-based adventure. But you now would like some help on how to reprogram the entire system into a single program file. Is this what you mean?

    It is hard to visualize your current system or your ultimate goal, and we also cannot tell if you are asking about how to represent a directed graph / linked list in a SQL database for example, or what. We might be able to recommend that you use a module which someone else has prepared, if we can understand more fully. It might be easily solvable without resorting to other modules.

    More clarity please, for example what is the reason you are building this system? Such information may have a large impact on what I or other people here might recommend. Also, we could use a link to your system if it is online or perhaps one of your program files' source code, posted between <CODE> tags.. Also no point in leaving your email address; you will have to check back here periodically for your free help from the community.

Re: linking
by tadman (Prior) on Jul 04, 2001 at 16:57 UTC
    Perhaps there should be a new category called "Obfuscated Questions" for interesting, compellingly vague questions.

    Before even trying to answer, you might want to specify the tools you have to work with. Windows, UNIX, MacOS, Palm Pilot, or Toaster Oven? Do you use, or are you planning to use an SQL database, flat file, drum memory, or wax tablet? Are you using CGI.pm, or have you cooked up your own? What level of experience do you have with Perl? Are you able to install additional modules?

    All important pieces of information that are not available, and cannot be deduced from the information you have given.
      databass <=> drum memory

      I like. (I'm wearing an ALL YOUR BASS ARE BELONG TO US tee shirt
      from www.happyhardcore.com my friend's site, done in ASP though blergh)