For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > October 2005 > Noobie needs help: CGI, tables and checkboxes.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Noobie needs help: CGI, tables and checkboxes.
Remy Lebeau

2005-10-07, 7:39 pm

Hi folks!

I'm a fairly major noobie with perl / cgi, and so this question might seem really simple, in which case, hopefully the answer will also be really simple!

I'm writing a site that will effectively be a gift registry for my fiance and I. I need to set it up so that people can tick a checkbox, and 'strikeout' any particular gift.

The problem is, I can't get the checkboxes to work!

What I need help with is:

1) How do I get the checkboxes to work properly?

2) How do I actually read which checkbox has been ticked!? all I want the value of the checkbox to be is the line number (that is what row), so I can go to the corresponding line in the flat file where I store the list, and put a 1 on the end.

thanks for any help!
Remy Lebeau

2005-10-07, 7:42 pm

For some reason it won't let me post code, so I've attached some of the offending code (so you can see what I'm doing) in a .txt attachement.
Remy Lebeau

2005-10-08, 9:17 pm

Ok, I got the checkboxes working ok, now the next problem :P

I'm trying to access an array from within a different "elsif" statement, and for some reason, it's not letting me!

I have:

elsif (param("submit")) {
@checks = param("Pres");
..
..
..

Later on I have:

elsif (param("verify")) {
..
..
..}

Within the "verify" parameter state, I want to be able to use that @checks information. Any ideas on how to get to it?
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com