954,515 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

database login page direct in python

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

monica23
Newbie Poster
9 posts since Jun 2011
Reputation Points: 10
Solved Threads: 0
 
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

griswolf
Veteran Poster
1,165 posts since Apr 2010
Reputation Points: 344
Solved Threads: 256
 

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"Location blah blah

inuasha
Newbie Poster
22 posts since Dec 2011
Reputation Points: 10
Solved Threads: 3
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: