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

Hi - I am a Perl newbie I'm afraid!

I wonder if any of you kind people could help me please! I wish to create a very simple Christmas gift management website for my family.

Put simply, I want to create an HTML page that contains a wish list - after each of the items on the list I want a drop-down menu that contains the menu items:

"Not bought" (default)
"Bought by person 1"
"Bought by person 2"
"Bought by person 3"
"Bought by person 4"

And a SUBMIT button.

When somebody buys an item on the list (from a real shop - nothing to do with the website) they can go onto the site, and change the value of that item from "Not bought" to "Bought by person 2" for instance, then click SUBMIT and the HTML will then permanently reflect the changes so that the item will always have "Bought by person 2" next to it - therefore preventing multiple purchases from other family members!

Does that make sense? I hope so. I know HTML really well, and know how to install CGI scripts and stuff - It's just writing them which proves tricky!

Any help/scripts etc would be very much appreciated by myself and my family!

Regards,

  • Comment on Help with updating HTML from drop down menu's please!

Replies are listed 'Best First'.
Re: Help with updating HTML from drop down menu's please!
by davido (Cardinal) on Nov 25, 2003 at 18:13 UTC
    There's no time like the present for learning Perl. Unfortunately, there's also no shortcut for doing so, just like you can't learn world history by watching an Oliver Stone movie. But don't be afraid.

    Here are some suggestions:

    • By all means, use the CGI.pm module.
    • Buy or check out from the library Learning Perl from O'Rielly & Assoc, and read it. It's not too lengthy or wordy. And a fantastic resource.
    • Read the POD for CGI.pm.
    • Get started on your project, and when you get stuck on a particular issue, ask here.

    People here are happy to help, but they probably aren't going to write your script for you without your getting started on it first. But as you walk through your project, asking questions here, I'm sure you'll get a lot of great help.

    Good luck. It sounds like a good idea for families that try to coordinate their giftgiving.


    Dave


    "If I had my life to live over again, I'd be a plumber." -- Albert Einstein
Re: Help with updating HTML from drop down menu's please!
by calin (Deacon) on Nov 25, 2003 at 18:18 UTC
    STEP no.1 (and most important): SECURITY! (if you intend to put the script on the public Internet).

    Think from the start how to make your code secure (from DOS attacks and garbage feeding to machine takeover). I believe this is the hardest task. I'm already scared.

Re: Help with updating HTML from drop down menu's please!
by Art_XIV (Hermit) on Nov 25, 2003 at 18:33 UTC

    Check out the DBD-CSV.pm module if you don't have access to a database or db files.

    Hanlon's Razor - "Never attribute to malice that which can be adequately explained by stupidity"