User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 391,555 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,625 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser:
Views: 649 | Replies: 0
Reply
Join Date: Feb 2005
Location: Chicago
Posts: 21
Reputation: higherGround574 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
higherGround574's Avatar
higherGround574 higherGround574 is offline Offline
Newbie Poster

web programming question

  #1  
Mar 13th, 2007
Hi,
I'm working on a OOP school project, and I'm trying to add a web interface to it; however, my experience working with html forms is limited. Anyways, I'm trying to set up a user login, where the user enters some info onto a form. I want to pull the info out and send it to some modules I've already written. If the user validates then pull up the next webpage. I wrote some stuff, but I don't really understand how to tell the cgi module how to open the next page if the info is good, or how to create multiple response page depending on the info contained on the forms. None of this has to be deployed.
Here's what i've written so far:

  1. [inlinecode]
  2. import cgi
  3. formStorage = cgi.FieldStorage( )
  4. print "Content-type: text/html"
  5. [/inlinecode]

  1. [inlinecode]
  2. <html>
  3. <title>System Login</title>
  4. <body>
  5. <form method=POST action="loginUI.py">
  6. <table width="97%" border="0">
  7. <tr>
  8. <td width="82%" height="23">&nbsp;</td>
  9. <td width="18%"><img src="python-powered-w-100x40.png" width="109" height="42"></td>
  10. </tr>
  11. </table>
  12. <table width="277%" height="244" border="0">
  13. <tr>
  14. <td height="104"><p>&nbsp;</p>
  15. <p><strong><font size="+3">Please Login___________________</font></strong></p></td>
  16. </tr>
  17. <tr>
  18. <td><table>
  19. <tr>
  20. <th>User Name
  21. <td><input type=text name=username>
  22. <tr>
  23. <th>Password
  24. <td>
  25. <input type=text name=password>
  26. </table>
  27. <input type=submit value="Submit", name=action></td>
  28. </tr>
  29. <tr>
  30. <td>&nbsp;</td>
  31. </tr>
  32. </table>
  33.  
  34. <p>&nbsp;
  35. </form>
  36. </body>
  37. </html>
  38. [/inlinecode]
Thanx in advance for any help
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Python Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Python Forum

All times are GMT -4. The time now is 9:34 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC