[Zope-DB] dtml-if query

Sungmook Kim sungmook at yahoo.com
Mon May 23 12:16:40 EDT 2005


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) 
최신 휴대폰 정보, 벨소리, 캐릭터, 문자메세지 - 야후! 모바일 (http://kr.mobile.yahoo.com) 
대한민국 블로그가 모인 곳! - 야후! 피플링(http://kr.ring.yahoo.com)


More information about the Zope-DB mailing list