clueless newbie to web programming
From: John David Adamski (adamski_at_graceland.edu)
Date: 02/18/04
- Next message: Jun Zhang: "permission denied"
- Previous message: Sisyphus: "Re: How to install Crypt::SSLeay using PPM on Wintel"
- Next in thread: gnari: "Re: clueless newbie to web programming"
- Reply: gnari: "Re: clueless newbie to web programming"
- Reply: Mothra: "Re: clueless newbie to web programming"
- Reply: Beable van Polasm: "Re: clueless newbie to web programming"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 18 Feb 2004 13:22:28 -0800
I have never coded in perl or mod_perl before and have a project that
needs me to do so. It is a web data entry system, using mod_perl to
generate cgi scripts. (terminology is probably not correct)
Using another project's code as an example, I have gotten all the
database retrievals and page layout done (html code). So, with hard
coded values, the "web pages" retrieve the correct data and displays
it in the way the user wants it. The problem is I need the different
"pages" (script/modules) to pass data between each other and to call
each other.
This is the stumbling point. I do not understand how to call and pass
data between the scripts.
The main module will either display a table of data to allow selection
of data based on which button is press or if certain conditions skip
displaying of data and go directly to the data entry script.
Below is some pseudo-code to hopefully explain what I need. main_prog
is the main driving module, and will either generate the web page or
call the data_entry module. If main_prog generates a web page it will
have 2 buttons on it, depending on which button is pressed either
view_screen or pick_a_or_b will be called and passes data (id &
username) to generate different web pages. The data_entry module
allows the user to enter only their data based on passed id. Each
modules is a separate file.
main_prog [file 1]:
sub main ()
{
# database retrieve record count based on id
if (sup_count = 0)
{
<< need to call data_entry and pass id and username>>
}
else
{
# retrieve data and generate html to put in table formatted
}
<<If button 1 is pressed go to view_screen and if button 2 is pressed
go to Pick_a_or_b passing>>
<<id and username.
>>
}
}
data_entry [file 2]:
sub enter_date ()
{
<< code goes here >>
}
view_screen [file 3]:
sub view_stuff ()
{
<< code goes here >>
}
Pick_a_or_b [file 4]:
sub pick_me ()
{
<< code goes here >>
}
Any help would be gratefully appreciated.
John
- Next message: Jun Zhang: "permission denied"
- Previous message: Sisyphus: "Re: How to install Crypt::SSLeay using PPM on Wintel"
- Next in thread: gnari: "Re: clueless newbie to web programming"
- Reply: gnari: "Re: clueless newbie to web programming"
- Reply: Mothra: "Re: clueless newbie to web programming"
- Reply: Beable van Polasm: "Re: clueless newbie to web programming"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]