J
|
Jane 4/7/2008 |
Hi, global $conn; //select all values from this view page $str = "select * from TableName where ID=".$_REQUEST["editid1"]; $rs = db_query($str,$conn); $data = db_fetch_array($rs); if ($_REQUEST["mail"]=="yes") { // ** Send email **** $adminemail="admin@email.com"; //you need to select useremail from login table here $str2 = "select EmailField from LoginTable where Username='".$_SESSION["UserID"]."'"; $rs2 = db_query($str2,$conn); $data2 = db_fetch_array($rs2); $useremail = $data2["EmailField"]; foreach($data as $field=>$value) $message.= $field." : ".$value."\r\n"; mail($adminemail, $subject, $message); mail($useremail, $subject, $message); //** Redirect to another page **** header("Location: TableName_list.php"); exit(); } |
N
|
nix386 author 4/7/2008 |
Ah I see what I was doing now thanks Jane. |
R
|
rainerwolf 9/19/2008 |
Hello Jane, i tried this code and i've got follwing error message: |
J
|
Jane 9/19/2008 |
Rainer, global $conn; $message = ""; $str = "select * from oe_vorgang1 where ID=".$_REQUEST["editid1"]; $rs = db_query($str,$conn); $data = db_fetch_array($rs); if ($_REQUEST["mail"]=="yes") { $adminemail="mail@testmail.de"; foreach($data as $field=>$value) $message.= $field." : ".$value."\r\n"; mail($adminemail, $subject, $message); header("Location: Copy_of_oe_vorgang1_list.php"); exit(); } |
R
|
rainerwolf 9/19/2008 |
Thank you yery much, Jane, it works great. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=33221&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' /> <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=33221&image=2&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' /> |