All: When I use the below code instead of getting the value for $encryptedpass in the SET I get $encryptedpass. What is going wrong and can anyone else suggest something else? <? $password = "<dtml-var Password>"; $encryptedpass = md5($password); echo "<dtml-call "REQUEST.set('encryptedpass', '$encryptedpass')">"; ?> Thanks, Todd
Todd Loomis, DMSO (SAIC) wrote:
All:
When I use the below code instead of getting the value for $encryptedpass in the SET I get $encryptedpass. What is going wrong and can anyone else suggest something else?
<?
$password = "<dtml-var Password>"; $encryptedpass = md5($password);
echo "<dtml-call "REQUEST.set('encryptedpass', '$encryptedpass')">";
?>
hi, If you use PHParser this can't work, because the whole document is parsed for dtml's BEFORE it's interpreted by php. so you can't put php-vars in the dtml-namespace and the like... greetings, maik. -- maik jablonski http://www.sachunterricht-online.de universitaet bielefeld http://www.zfl.uni-bielefeld.de zentrum fuer lehrerbildung tlph://+49.(0).521.106.4234
Hi Todd, take care about what will be done: First DTML-called will be evaluated as it where DTML with python. After that PHP will be parsed by PHP Post-process-parser $password will be the value of Python namespace/object variable Password. But encryptedpass will be the String '$encryptedpass' You need a python function to do the md5 function. Regards, Dirk "Todd Loomis, DMSO (SAIC)" schrieb:
All:
When I use the below code instead of getting the value for $encryptedpass in the SET I get $encryptedpass. What is going wrong and can anyone else suggest something else?
<?
$password = "<dtml-var Password>"; $encryptedpass = md5($password);
echo "<dtml-call "REQUEST.set('encryptedpass', '$encryptedpass')">";
?>
Thanks, Todd
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Dirk Datzert -
Maik Jablonski -
Todd Loomis, DMSO (SAIC)