in reply to Re: cgi Beginner
in thread cgi Beginner

It just needs to run. All the products are in an existing database, in fact What I have is the entire website my boss setup about 4 years ago for another company. He just cannot remember how he got it working. His site was on a actual web server visable to the internet mine is only to be visable to our intranet. Would this make a Difference? Thanks For your quick response

Replies are listed 'Best First'.
Re: Re: Re: cgi Beginner
by DamnDirtyApe (Curate) on Nov 09, 2002 at 06:01 UTC

    Thanks for the extra info. Forgive me if I'm wrong, but it sounds to me like you're a bit green at web development, or at least at CGI programming. Here's some advice that might get you going.

    The basic catalogue should generally consist of two main components: A way of determining what products the customer wants to see, and a way of getting that information from your database to the customer's screen.

    To determine what it is your customer want's to see, you'll want to read the parameters in the url. If an address such as http://www.mystore.com/catalogue.pl?category_id=201 were requested, your script catalogue.pl should use the CGI module to read the category requested, then construct a SQL query and query the database using the DBI module.

    The database will (hopefully) return some product information for you. You'll probably want to loop through this info, and display it to the user in a useful form. This should at least get you started with a functional catalogue.

    One more thing I'd suggest is that you look at using a templating system (my favourite is the Template Toolkit) to separate your application code (Perl) from your presentation code (HTML/Javascript/...). It will make your life much, much easier. :-)

    Good luck, and just ask if you have any more questions.


    _______________
    DamnDirtyApe
    Those who know that they are profound strive for clarity. Those who
    would like to seem profound to the crowd strive for obscurity.
                --Friedrich Nietzsche