Hi,
I'm working on a simple self-made board based upon
mysqldb.
The idea is that I want anonymous people allow to
write with a password protection.
Now I want them to be able to delete and edit
articles.
(but of course only with their password)
I'd like to make a if query in addition to the code
below so that the updatemethod is only called if the
password the user enters equals to the one from the
database.
the db table has the following fields:
id, title, article, author, password
now i have to make a comparison prior to the
updatemethod call.
something like <dtml-if expr="password_check ==
<dtml-var password>">
<dtml-call updatemethod>
</dtml-if>
I'd like to do it with dtml but dont know how.
Could anyone help?
--
<dtml-if submit>
<dtml-call updatemethod>
<h2>article edited!</h2>
<p>
<a href="list">List</a> or <a
href="add">add
another title</a>
<dtml-else>
<h2>Edit</h2>
<dtml-in selectonemethod>
<form action="edit" method="POST">
<table border=0>
<tr>
<td>Title</td>
<td><input name="title" width=30 value="<dtml-var
name="title">"></td>
</tr>
<tr>
<td>Article</td>
<td><input name="article" width=30 value="<dtml-var
name="article">"></td> </tr>
<tr>
<td>Password</td>
<td><input name="password_check" width=30
value=""></td> </tr>
<tr>
<td colspan=2 align=center>
<input type="hidden" name="id" value=<dtml-var
name="id">>
<input
type="submit" name="submit" value="Edit"> </td> </tr>
</table>
</form>
</dtml-in>
</dtml-if>
___________________________________
¹«·á 1GB¿ë·®!, ´õ ÀÌ»ó ¿ë·® °í¹Î¾ø´Â - ¾ßÈÄ! ¸ÞÀÏ (http://mail.yahoo.co.kr)
ÃֽŠÈÞ´ëÆù Á¤º¸, º§¼Ò¸®, ij¸¯ÅÍ, ¹®ÀÚ¸Þ¼¼Áö - ¾ßÈÄ! ¸ð¹ÙÀÏ (http://kr.mobile.yahoo.com)
´ëÇѹα¹ ºí·Î±×°¡ ¸ðÀÎ °÷! - ¾ßÈÄ! ÇÇÇøµ(http://kr.ring.yahoo.com)
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
I'm working on a simple self-made board based upon
mysqldb.
The idea is that I want anonymous people allow to
write with a password protection.
Now I want them to be able to delete and edit
articles.
(but of course only with their password)
I'd like to make a if query in addition to the code
below so that the updatemethod is only called if the
password the user enters equals to the one from the
database.
the db table has the following fields:
id, title, article, author, password
now i have to make a comparison prior to the
updatemethod call.
something like <dtml-if expr="password_check ==
<dtml-var password>">
<dtml-call updatemethod>
</dtml-if>
I'd like to do it with dtml but dont know how.
Could anyone help?
--
<dtml-if submit>
<dtml-call updatemethod>
<h2>article edited!</h2>
<p>
<a href="list">List</a> or <a
href="add">add
another title</a>
<dtml-else>
<h2>Edit</h2>
<dtml-in selectonemethod>
<form action="edit" method="POST">
<table border=0>
<tr>
<td>Title</td>
<td><input name="title" width=30 value="<dtml-var
name="title">"></td>
</tr>
<tr>
<td>Article</td>
<td><input name="article" width=30 value="<dtml-var
name="article">"></td> </tr>
<tr>
<td>Password</td>
<td><input name="password_check" width=30
value=""></td> </tr>
<tr>
<td colspan=2 align=center>
<input type="hidden" name="id" value=<dtml-var
name="id">>
<input
type="submit" name="submit" value="Edit"> </td> </tr>
</table>
</form>
</dtml-in>
</dtml-if>
___________________________________
¹«·á 1GB¿ë·®!, ´õ ÀÌ»ó ¿ë·® °í¹Î¾ø´Â - ¾ßÈÄ! ¸ÞÀÏ (http://mail.yahoo.co.kr)
ÃֽŠÈÞ´ëÆù Á¤º¸, º§¼Ò¸®, ij¸¯ÅÍ, ¹®ÀÚ¸Þ¼¼Áö - ¾ßÈÄ! ¸ð¹ÙÀÏ (http://kr.mobile.yahoo.com)
´ëÇѹα¹ ºí·Î±×°¡ ¸ðÀÎ °÷! - ¾ßÈÄ! ÇÇÇøµ(http://kr.ring.yahoo.com)
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db