J
|
Jane 7/20/2006 |
Hi, function BeforeEdit(&$values, $where) { $values["Password"] = "md5(".$values["Password"].")"; return true; }
|
G
|
giles author 7/20/2006 |
Hi Jane, |
J
|
Jane 7/21/2006 |
Giles, function BeforeEdit(&$values, $where) { global $conn; $str = "select * from TableName where ".$where; $rs = db_query($str,$conn); $data = db_fetch_array($rs); echo $data["Password"]; echo $values["Password"]; if (strcmp("'".$data["Password"]."'",$values["Password"])!=0) { $values["Password"]="md5(".$values["Password"].")"; } return true; }
|
G
|
giles author 7/21/2006 |
Hi Jane, |
![]() |
Sergey Kornilov admin 7/22/2006 |
You need to remove echo $data["fd_Password"]; echo $values["fd_Password"]; statements because redirect in AfterEdit event won't work if you sent something to output. |
G
|
giles author 7/22/2006 |
Hi Sergey, |