computer programming (PYTHON)

My first page is
<html>
<head>
<title>Name Game</title>
</head>
<body>
<h1>Name Game</h1>

<form action="namegame.py">
<p>
Enter your name: <input type="text" name="name" />
</p>
<p>
<input type="submit" value="Go" />

</p>
</form>
</body>
</html>

My second .py page is
import cgi
form = cgi.FieldStorage()
name = form["name"].value

print """Content-type: text/html

<html>
<head>
<title>Name Game</title>
</head>
<body>
"""
# print HTML body using form data
print "<h1>Name Game</h1>"
print "<dl>"
print "<dt>form["name"].value</dt>"
print "<dd> name </dd>"
print "<dt>Uppercase</dt>"
print "<dd>upper(form["name"].value)</dd>"
print "<dt>No spaces</dt>"
print "<dd></dd>"
print "<dt>No vowels</dt>"
print "<dd></dd>"
print "</dl>"
print "</body></html>"

I want to ask how come form["name"].value is invalid when it is loading the second page?? I just want to show form["name"].value to be the word that the person entered at the first page?? thank you very much

  1. 👍 0
  2. 👎 0
  3. 👁 174

Respond to this Question

First Name

Your Response

Similar Questions

  1. Please i needd an answer asap!!!

    I give medals and 'best answer' :) I need help asap! Which of the following is one way to assess whether or not a learning game is effective? a. Being able to win the game b. doing a quiz before and after the game to see what you

  2. Technology

    Which of the following is one way to assess whether or not a learning game is effective? A.Being able to win the game B.Doing the quiz before and after the game to see what you have learned.*** C.Making it difficult to win the

  3. English

    Which of the following is a true statement about an MLA Works Cited page? A. The Works Cited page requires no special formatting. B. The Works Cited page should immediately follow the conclusion and be on the same page. C. The

  4. math

    Please check answers 1. Michael, a freelance editor, charges the rates shown in the table below to edit manuscripts. The cost per page increases as the quality of editing improves. Michael also gives a 5% discount if the entire

  1. math

    Jeff made 2 baskets in his first basketball game and 1 more basket in his next game. Assuming he scores 1 more basket each game, write a recursive formula to generate the sequence representing the total number of baskets Jeff made

  2. Calculus

    A rectangular page is to contain 8 square inches of print. The margins at the top and bottom of the page are to be 2 inches wide. The margins on each side are to be 1 inch wide. Find the dimensions of the page that will minimize

  3. Operating system

    What is the . Let us define “most-recently-used” (MRU) as a page removal algorithm that removes from memory the most recently used page. Perform a page trace analysis using three page frames and the page requests from the

  4. Operating Systems

    Given that main memory is composed of only three page frames for public use and that a seven-page program (with Pages a, b, c, d, e, f, g) that requests pages in the following order: a, c, a, b, a, d, a, c, b, d, e, f. Using the

  1. Calculus

    A printed page is to have 1.5 inches margin on all sides. The page should contain 144 square inches of type. What dimension of the page will minimize the area while still meeting these other requirements?

  2. arithmetic sequences

    jessie is playing an arcade game that costs 50cents for the first game and 25cents to continue if she loses. how much will she spend on the game if she continues 9 times?

  3. Math

    A bookworm finds itself on page 1 of volume 1 and begins eating straight through to the last page of volume 5.If each book is 6 centimeters thick,including the front and back covers,which are half a centimeter each what is the

  4. English

    1. MLA formatting requires which of the following? A. double spacing throughout, including the Works Cited page B. half-inch margins C. a title page D. paragraphs indented one inch 2. In MLA, parenthetical references _______. A.

You can view more similar questions or ask a new question.