Re: Passing variables

Discussion in 'HTML' started by cwdjrxyz, Jul 30, 2010.

  1. cwdjrxyz

    cwdjrxyz Guest

    On Jul 29, 11:05 pm, lrhorer <> wrote:
    > lrhorer wrote:
    > > Hello,

    >
    > >         I'm pretty much a noob at writing html pages.  I've only done
    > >         a little,
    > > and that not very recently.  I've just had a project pop up, though,
    > > and I need a little hand holding.  I am using a CGI script to create a
    > > page on my Apache2 server.  I need to do two things to a number of
    > > simple values on the page.  I have 8 drop down boxes, each with a
    > > possible range of values from 68 to 82.  These values represent the
    > > values I have stored in a data file on the server.

    >
    > >         The first thing I need to do is pull the data for each of the
    > >         8
    > > variables from the file and plug the values in as the default value
    > > for
    > > each of the respective drop-downs on the page.  When the user views
    > > the page, then, he can decide to choose any or all of the values in
    > > the
    > > drop boxes.  Getting the values from the file is easy (see below) but
    > > how do I pre-set the values in the drop boxes?

    >
    > >         The second thing I need to do is pass the data off to the
    > >         server so it
    > > can update the values in the file.  I've read up a bit about the GET
    > > and POST methods of passing values back to the web server, but frankly
    > > I haven't understood it well enough to do much more than ascertain I
    > > will probably need to employ the POST method.  I think.

    >
    >         OK, I figured out what I was doing wrong on the second item, along with
    > realizing GET was an easier choice for this script.  I'm still stuck on
    > the first item, though.  I've tried a number of things, but I haven't
    > hit on how to load the defaults from the file.
    >
    >         I was trying to create a separate form for each field, when what I
    > needed was only one form for the entire script.


    I am not sure this is the best group to find an answer, so if you do
    not get a reply that helps, search for a perl or cgi group. If you go
    to Google and select Groups, you can search for such groups. It
    appears you may have better luck if you search one of the most active
    perl groups first. I turned off cgi on the server I use years ago and
    now use php for forms and such. Thus I can not be of much help to you.
    cwdjrxyz, Jul 30, 2010
    #1
    1. Advertising

  2. cwdjrxyz

    cwdjrxyz Guest

    On Jul 30, 10:39 am, Sherm Pendley <> wrote:
    > cwdjrxyz <> writes:
    > > I am not sure this is the best group to find an answer, so if you do
    > > not get a reply that helps, search for a perl or cgi group. If you go
    > > to Google and select Groups, you can search for such groups. It
    > > appears you may have better luck if you search one of the most active
    > > perl groups first.

    >
    > Yes, he'd probably have better luck in a group that discusses the lan-
    > guage he's using. But that language isn't Perl. :)


    You are correct. The poster mentioned Perl and PHP in the text, but I
    see he also mentioned CGI script. I did not examine the script example
    very much since I at once saw that it was not something that I use. As
    I mentioned, I have had cgi turned off on the server I use for years
    and have found that php takes care of my needs. CGI and Perl can be
    very powerful, but they also are very powerful for hackers. Thus you
    had better know how to protect them very well if you write them and
    know that any "canned" script you may use comes from a very reliable
    source.. Whole web sites have been defaced or taken down by hackers
    making use of such scripts.
    cwdjrxyz, Jul 30, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Victor Bazarov
    Replies:
    25
    Views:
    845
    E. Robert Tisdale
    Mar 23, 2005
  2. Replies:
    9
    Views:
    927
  3. pereges
    Replies:
    7
    Views:
    421
    pereges
    Jun 1, 2008
  4. Ramon F Herrera
    Replies:
    8
    Views:
    467
    Pascal J. Bourguignon
    Sep 13, 2009
  5. deadpickle
    Replies:
    1
    Views:
    951
    Jens Thoms Toerring
    Nov 7, 2010
Loading...

Share This Page