Question: 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

 Below this internal server error is my code python file. The

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!