computer programming (PYTHON)

posted by .

My first page is
<title>Name Game</title>
<h1>Name Game</h1>

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


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

print """Content-type: text/html

<title>Name Game</title>
# 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

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. book report

    what do i have to write on a cover page of book report?
  2. computer programming (PYTHON)

    My first page is <html> <head> <title>Name Game</title> </head> <body> <h1>Name Game</h1> <form action=""> <p> Enter your name: <input type="text" name="name" …
  3. Web application development JSP

    Below is the following jsp code for a homework assignment im working on. Im allow four input text fields in which a customer can enter the amount of each fruit they want to buy, a submit button, and a reset button. After a customer …
  4. Pharmacy

    when a generic form of drug is prescibed, which of the following must be included on the label?
  5. java programming

    Provide a class called Letter for authoring a simple letter. The letter class has three data fields, the name of the sender, the name of the recipient, a body of the letter. 1. Supply the class constructors (default , and overloaded …
  6. programming

    write a c program that accepts a name as first name last name but displays the name as last name first name in the output
  7. Javascript

    Input: A text string, using prompt. Output: Either "Valid name" or "Invalid name", depending on whether the input names fit the required format, which is Last name,first name, middle initial where neither of the names have more than …
  8. English

    1. What is the name for the head of an orphanage?
  9. Writing

    I need an amazing title that rhymes and includes the name Garza.... Same Thing with the name Coffee #i want these name to stand out as a title
  10. Computer science

    I want to make my traffic lights run automatically without any user input. I have created this code so far but the images don't show up please help. My code: <!DOCTYPE html> <html> <head> <script type="text/javascript"> …

More Similar Questions