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

R

ronrsr

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>
 
J

Jonathan N. Little

ronrsr said:
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....
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top