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

Respond to this Question

First Name

Your Response

Similar Questions

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

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

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

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

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

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

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

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

  1. operating system

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

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

  3. algebra 1

    The Fun Guys game rental store charges an annual fee of $20 plus $6.50 per game rented. The Game Bank charges an annual fee of $50 plus $3.50 per game. For how many game rentals will the cost be the same at both stores? What is

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

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