This topic is locked

email link to record

10/5/2010 7:29:21 AM
PHPRunner General questions
J
jasonfrew author

I have a process that emails the details of a new record added to the database to a group of users
Is there a way i can include a link to the record in the Email
So when the user receives the email they click on the link. The link then opens the View page at the new record added?
Regards
Jason

A
ann 10/5/2010

Jason,
here is a sample code to add to your body message code:

$message.="<a href='Your full address here/TableName_View.php?editid1=".$keys["KeyFieldName"]."'>link</a>";



where TableName is your actual table name, KeyFieldName is your actual key field name.

J
jasonfrew author 10/5/2010



Jason,
here is a sample code to add to your body message code:

$message.="<a href='Your full address here/TableName_View.php?editid1=".$keys["KeyFieldName"]."'>link</a>";



where TableName is your actual table name, KeyFieldName is your actual key field name.


Perfect Ann thanks
Regards
Jason

J
jasonfrew author 10/7/2010

Hi , my code looks as below

the problem im having is that it nolonger sends the email and does not show that the record has been submited

it does however submit the record. i can see it if i go back to the list page.
$email="my.name@mydomain.com";

$from="hamallcrm@mydomain.com";

$msg="";

$msg.="<a href='http://hamallcrm/Enquiries_View.php?editid1=".$keys["quote_no"]."'>link</a>";;

$subject="A new Quote has been added to the system";
foreach($values as $field=>$value)

{

if(!IsBinaryType(GetFieldType($field)))

$msg.= $field." : ".$value."\r\n";

}
$ret=runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $msg, 'from'=>$from));

if(!$ret["mailed"])

echo $ret["message"];

A
ann 10/8/2010

Hi,
It's difficult to tell you what's happening without seeing actual files.

Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error. 'Demo Account' button can be found on the last screen in the program.