Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

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

Status
Not open for further replies.

PaulShotgun

Technical User
Mar 7, 2002
10
GB

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,

Paul
 
The easiest thing to do is going to probably be to maintain a DBM file based database on the local server.

Then for each item you maintain a hash in the database.

When someone buys something you update that DBM hash.

People could add their own items to the hash.

So using CGI.pm to manage your CGI interaction and then the dbmopen/dbmclose routines built into perl will let you get this app off the ground pretty quickly.

There may be something canned but I have not seen a script that does this sort of thing.
 
Thanks but I not familiar with DBM. Could you give me a walkthru please?

i was hoping there was already a simlar script already written

paul
 
Perl has a great tutorial on this

perldoc -f dbmopen

That'll get you started.

Everyone wants their custom script to have been already written, debugged and published via the GPL. It rarely happens, I'll have to talk to someone about that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top