CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
sharing info between scripts



Nov 30, 2000, 7:15 AM

Post #1 of 2 (327 views)
sharing info between scripts Can't Post

OK, here's the deal. I am trying to develop a web interface that will allow authorized users to view and modify records in a given file.

So I started with an HTML form that allows the user to search for records. A perl script does the search, then generates an HTML page with a radio button for each matched record that the script finds. The user can then select the record they are interested in via the associated radio button.

Now comes the hard part. Once the user selects the radio button for the correct record, I want the user to be able to click a submit button that would generate an HTML form that contains the record's inforation so that the user can edit that record.

Is there a way to pass the selected record's information to the newly generated HTML form? Or is there another way of doing it rather than using the typical HTML radio and submit buttons to make the selection?

Thank you in advance.

Enthusiast / Moderator

Nov 30, 2000, 9:44 AM

Post #2 of 2 (327 views)
Re: sharing info between scripts [In reply to] Can't Post

Yes this is the easiest part actually, you just have to find out what is unique about that data in that particular record, maybe an ID number?? You cna always use the line number too. Or try putting 2 or 3 fields together, This is a what I mean.

You have a group of radio buttons named "record". For the value of each radio button that is next to the record, make the value of that radio button, either a few fields combined in that record, or make it the line number of that record, or just use the id number of that record, what ever you have to work with, the key is just to finding the unique element to that record. Then you can say in your script

if ($form{'record'} eq "$record_id"){
##print out the record for modifing

While your looping through the records.

Do you see what I mean???



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives