Hi, I try to make a simple paswd recovery page for my site.Username and password stored in mysql db.My DTML document is: <form action="deg" method="POST"> <h2>Şifre değiştirme sayfasına hoşgeldiniz<h2> <br> KULLANICI ADI: <br><input type="text" name="name:ignore_empty"></br> <p><br> ŞİFRE: <br> <input type="text" name="sifre:ignore_empty"></br> <p><br> ŞİFRE TEKRAR: <br> <input type="text" name="sifret:ignore_empty"></br> <p><br> <input type="submit" value="yenile" align="center" > <dtml-var "deg(REQUEST)"> </form>
and my external python method is as follows: import crypt import MySQLdb conn = MySQLdb.connect(host="localhost", user = "rxxxx", passwd = "yyyy", db = "zzzz") cursor = conn.cursor() #return context.responseMessage() def deg(self): cryp = crypt.crypt(sifre,'mysecret') if request.form["sifre"] == request.form["sifret"]: cursor.execute("""update mytable set PASS_WORD=%s where USERNAME=%s""",(cryp,name)) print "SUCCESS" else: print "please try again!" cursor=conn.close() But when i tested from DTML Document I got this error *Error Type: NameError* *Error Value: global name 'sifre' is not defined* Can anybody help me? Regards MuratB
_______________________________________________ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )