J
|
Jane 11/27/2007 |
Bart,
and add following code just before: <A onclick="if (!confirm('Do you really want to update these records?')) return false; frmAdmin.a.value='update'; frmAdmin.submit(); return false;" href="TableName_list.htm#">send email</A>
function BeforeDelete($where) { //delete records if(@$_POST["a"]=="delete") return true; //send email with selected records global $conn,$strTableName; $email="test@test.com"; $message=""; $subject="your subject"; $rs = db_query("select * from " . $strTableName ." where ". $where,$conn); if($data=db_fetch_array($rs)) { foreach($data as $field=>$value) $message.= $field." : ".$value."\r\n"; mail($email, $subject, $message); } return false; } |
B
|
bbanks author 11/27/2007 |
Bart, you can do the following:
|
J
|
Jane 11/28/2007 |
Bart, function BeforeDelete($where) { //delete records if(@$_POST["a"]=="delete") return true; //send email with selected records global $conn,$strTableName; $message="your message"; $subject="your subject"; $rs = db_query("select * from " . $strTableName ." where ". $where,$conn); while($data=db_fetch_array($rs)) { $email=$data["PersonResp"]; mail($email, $subject, $message); } return false; } |
B
|
bbanks author 11/28/2007 |
Bart, try to use this code in the Before record deleted event:
|
J
|
Jane 11/29/2007 |
Bart, ... echo "select from ".$strTableName." where ". $where; $rs = db_query("select from " . $strTableName ." where ". $where,$conn); ...
|
B
|
bbanks author 11/29/2007 |
Bart, this error happens when there are some errors in your SQL query. Try to print SQL query before executing: If it doesn't help you can publish your application on Demo Account and send me link to your pages. I'll find what's wrong with your project inspecting it at Demo account site.
|