Ich weiß nicht, ob ich hier im Bereich richtig bin, ich wusste aber nicht, in welchen anderen BEreich meine Frage passt.
Ich will ersteinmal einen Login-Bereich machen, der mit eine Python-HTML-Verbindung läuft. Dazu habe ich mir einen Beispielcod gemacht:
Python:
Code: Alles auswählen
#!/usr/bin/python
import cgi
import cgitb; cgitb.enable()
# get the info from the html form
form = cgi.FieldStorage()
#set up the html stuff
reshtml = """Content-Type: text/html\n
<html>
<head><title>Security Precaution</title></head>
<body>
"""
print reshtml
User = form['UserName'].value
Pass = form['PassWord'].value
if User == 'john' and Pass == 'jacob':
print '<big><big>Welcome'
print 'mr. Jingleheimerschmidt !</big></big><br>'
print '<br>'
else:
print 'Sorry, incorrect user name or password'
print '</body>'
print '</html>'
Code: Alles auswählen
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Admin Login</title>
</head>
<body>
<big><big>Login
Here<br>
<br>
</big></big>
<form action="./cgi-bin/ind.py" name="LoginForm"><big>Administration
Login<br>
User Name<br>
<input name="UserName"><br>
<br>
<br>
Password<br>
<input name="PassWord"><br>
</big><br>
<br>
<br>
<input type="submit">
<br>
</form>
__ <br>
</body>
</html>
http://arne.hobby-site.org/ext/htmp.png
Kann man es irgendwie einrichten, dass die Daten nicht angezeigt werden?? - Oder geht soetwas nicht??
Danke schoneinmal für Tipps...
akhof