Good day expert, am trying to direct user to a web page if login is okay in python but does not work

if username==okay and password == okay:
# direct to success_page.py
print "Location: success_page.py\r\n";

else:
direct to errorpage.py

the code does not work as the web page is not word message and cannot be printed. any help
thanks

the code does not work as the web page is not word message and cannot be printed. any help
thanks

I'm sorry, I do not understand this. Do you need to create a web page using Python? There are many options to do that. I use Django for large projects with simple database needs; you may also like to look at Web2Py or an overview: http://wiki.python.org/moin/WebFrameworks

you need the code to print out the html not just the words so instead of print"location blah blah" you need to do print"<html><head><title></title></head><body><p>Location blah blah</p></body</html>"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.