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. 👍
  2. 👎
  3. 👁
  4. ℹ️
  5. 🚩

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

  3. 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

  4. 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

  1. math help!

    A lottery game asks you to pick 5 numbers from the set 1, 2, 3, ... , 29, 30. How many ways are there to play this lottery game? (Assume that this is a game where the order of your picks does NOT matter.) A) 27,405 B) 84,825 C)

  2. algebra

    A student opens a math book to two facing pages.The product of the page numbers is 210.Find the page numbers. The first page is _________ The second page is________

  3. Calculus

    A rectangular page is to contain 72 square inches of print. The page has to have a 4 inch margin on top and at the bottom and a 2 inch margin on each side. Find the dimensions of the page that minimize the amount of paper used.

  4. physics

    An electron of charge -e and a long straight wire carrying a current I to the right are both in the plane of the page, as shown above. In the position shown, the electron is a distance R from the wire and is moving directly toward

  1. Math

    Martin has scored an average of 12 points per game this season Game 1 he scored 8 points, game 2 he scored 11 points, game 3 he scored 12 points, and game 4 he scored 16 points. Use numbers from the box (2,3,4,5,8,11,12,13,16,n)

  2. 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

  3. Math/Algebra

    A student opens a mathematics book to two facing pages. The product of the page number is 420. Find the page numbers. The first page is ____ The second page is ____

  4. 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

View more similar questions or ask a new question.