Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Below this internal server error is my code python file. The question is that fix the error in my code that way the internal server

image text in transcribed

Below this internal server error is my code python file. The question is that fix the error in my code that way the internal server error dosent Occur?

#!/usr/bin/python3

# Import modules for CGI handling import cgi, cgitb

# Create instance of FieldStorage form = cgi.FieldStorage()

# Get data from fields first_name = form.getvalue('finame') last_name = form.getvalue('lname') email_ad = form.getvalue('ema')

if form.getvalue('sex'): sex = form.getvalue('sex') else: sex = "Not set"

if form.getvalue('agegroup'): subject = form.getvalue('agegroup') else: subject = "Not entered"

print ("Content-type:text/html ") print ("

") print ("") print ("Hello - Second CGI Program") print ("") print ("

") print ("

Hello %s %s

" % (first_name, last_name)) print ("

The email address is %s

" % (email_ad)) print ("

Gender is %s

" % (sex)) print ("

your age is between %s

" % (subject)) print ("") print ("

Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at you@example.com to inform them of the time this error occurred, and the actions you performed just before this error More information about this error may be available in the server error log

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions