laziness, impatience, and hubris | |
PerlMonks |
Re: Re: Re: cgi Beginnerby DamnDirtyApe (Curate) |
on Nov 09, 2002 at 06:01 UTC ( [id://211620]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|