Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Re: cgi Beginner

by DamnDirtyApe (Curate)
on Nov 09, 2002 at 06:01 UTC ( [id://211620]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: cgi Beginner
in thread cgi Beginner

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://211620]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (1)
As of 2024-04-25 04:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found