how to send email only in duplicate case

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
amiens80
User
Posts: 446

how to send email only in duplicate case

Post by amiens80 »

hi,

i wish to send an email alert only when there is a duplicate record added.
In Email_Sending server event, how to detect that php case ?

My idea was to detect the current_page_id and the presence of table id in the url (because when you hit duplicate button, there is the id record in the url parameter) but it did not work.

$duplicate_case=(CurrentPageID()=="add" && isset($_GET['mytable_id']));
if ($duplicate_case)
die ("ok to send email because duplicate case");
else
die ("you are not in a duplicate case");

The problem is the $_GET variable is not exist anymore in Email_Sending server, so i'm out of idea ....

do you have another solution ?

Best regards


mobhar
User
Posts: 11660

Post by mobhar »

What did you mean by The problem is the $_GET variable is not exist anymore in Email_Sending server ?

Please explain it in more detail. How did you get that $_GET variable while it does exist?


arbei
User
Posts: 9288

Post by arbei »

You should use the data (as function arguments) passed to the Email_Sending server event.


Post Reply