why aren't i passing this parameter to the next page

Discussion in 'HTML' started by ronrsr, Nov 27, 2006.

  1. ronrsr

    ronrsr Guest

    each page is a Python program -= they communicate by passing parameters
    appended to the URL - I'm trying to pass ZID, but in this case, no
    parameter is being passed. The passing of parameters work up to this
    point.

    thanks for your help.

    -rsr-






    <h1>Update A Zinger </h1>
    <hr>
    <form action="do_update.cgi"
    name="form"
    enctype="application/x-www-form-urlencoded"
    method="POST">
    <input type="hidden" name="zid" value="319">
    <table width="640" border="0" cellpadding="2" cellspacing="3">
    <tr>
    <td valign="top">zid:</td>
    <td>319</td>

    </tr>
    <tr>
    <td valign="top">Keywords:</td>
    <td>
    Ctrl+Click to select multiple keywords<br>
    <select multiple size="5" name="keywords">
    <option value='aBQN'>Aguadilla, PR (BQN)
    <option value='aAUA'>Aruba (AUA)
    <option value='aAUS'>Austin, TX (AUS)
    <option value='aBDA'>Bermuda (Hamilton), BM (BDA)
    <option value='aBOS'>Boston, MA (BOS)
    <option value='aBUF'>Buffalo, NY (BUF)
    <option value='aBUR'>Burbank, CA (BUR)
    <option value='aBTV'>Burlington, VT (BTV)
    <option value='aCUN'>Cancun, Mexico (CUN)
    <option value='aCLT'>Charlotte, NC (CLT)
    <option value='aORD'>Chicago, IL/O’Hare (ORD)
    <option value='aCMH'>Columbus, OH (CMH)
    <option value='aDEN'>Denver, CO (DEN)
    <option value='aFLL'>Ft Lauderdale, FL (FLL)
    <option value='aRSW'>Ft Myers, FL (RSW)

    </select>
    <p>
    Add New Keyword(s): <input type="text" name="new_keywords"
    size="80" value="">
    <br>
    Separate new keywords with a semi-colon, e.g. "First Keyword;
    Second Keyword; etc"
    </td>
    </tr>
    <tr>
    <td valign="top">Source:</td>

    <td><textarea cols="80" rows="5"
    name="citation">“Agriculture in Crisis,†<i>Rethinking US
    Agricultural Policy: Changing Course to Secure Farmer Livelihoods
    Worldwide</i>, September 2003, 9
    </textarea></td>
    </tr>
    <tr>
    <td valign="top">Quotation:</td>
    <td><textarea cols="80" rows="5" name="quotation">In 2001,
    government payments to farmers amounted to an astounding 47 percent of
    farmer income, up from about 20 percent in the 1990s. Despite this
    enormous infusion of cash, farmer income declined steadily during the
    same period, and many US farmers are under increasing financial stress.
    </textarea></td>
    </tr>
    <tr>

    <td><input type="submit" name="updatebutton"
    value="Update"></td>
    <td align="right"><input type="submit" name="deletebutton"
    value="Delete this entry"></td>
    </tr>
    </table>
    </form>
    <hr>
    <form action="display.cgi"
    name="cancel"
    enctype="application/x-www-form-urlencoded"
    method="get">
    <input type="submit" value="Cancel">
    </form>


    </body>
    </html>
    ronrsr, Nov 27, 2006
    #1
    1. Advertising

  2. ronrsr wrote:
    > each page is a Python program -= they communicate by passing parameters
    > appended to the URL - I'm trying to pass ZID, but in this case, no
    > parameter is being passed. The passing of parameters work up to this
    > point.
    >
    > thanks for your help.
    >
    > -rsr-


    <snip html>

    You have two forms in your code, one via POST to "do_update.cgi" and the
    other GET to "display.cgi". Are you expecting to use one to set some
    value and the other to somehow retrieve it? If so you are fundamentally
    misunderstandings how the process works.

    The first form that POSTs to "do_update.cgi" would send the value of
    fields "zid", "keywords", "new_keywords", "quotation", "updatebutton",
    and "deletebutton" within attached content and retrieved via an
    environmental variable. The "do_update.cgi" script would have to process
    this info and unless the script passes on info in another form or
    records it in some sort of a database the values will be lost.

    GET is for GETting some resource on the server, example a URL of a web
    page, image, file, etc. There are no named fields in your second form so
    *no* values would be passed to "display.cgi"! With GET forms the named
    fields are passes via the query string in name-value pairs that are
    appended to the URL, e.g.,

    http://www.example.com/receiving.cgi?field1=value1&field2=value2

    In you example, "display.cgi" will receive *no information* and will
    have no idea what you did with "do_update.cgi" and your "zid".

    Looks like you need to do a little research on how CGI works....

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Nov 27, 2006
    #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. Quick Function

    jsp send parameter to next page

    Quick Function, Jul 15, 2004, in forum: Java
    Replies:
    1
    Views:
    4,050
    Tor Iver Wilhelmsen
    Jul 15, 2004
  2. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    879
    Mark Rae
    Dec 21, 2006
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,842
    Smokey Grindel
    Dec 2, 2006
  4. Deniz Bahar
    Replies:
    2
    Views:
    465
    Andrey Tarasevich
    Mar 9, 2005
  5. Mister B
    Replies:
    8
    Views:
    550
    Nick Keighley
    Aug 26, 2010
Loading...

Share This Page