Hello I have the following problem:
- I have a form where the user enter a code "brnnna15..." and press a button;
- CF6 use the code to read a single row in a MySql DB Table, use the data to prepare a e-mail and send it;
- show a message to the user saying "I have found what you have asked with code "brnnna15..." and I have sent a e-mail containing your data to mickeymouse@gmail.com (email address is one of the fields read from the data base);
- this may be a privacy problem so I have to change the message in tihis way: "I have found what you have asked with code "brnnna15..." and I have sent a e-mail containing your data to m**************e@gmail.com.
- I think I can do this using php custom code before showing the message but I am unable to use the e-mail address from the database inside the custom code! I have tried a lot of syntax form but no one seems to work!!! Just as an example I copy here the last attempt:
<?php
$em = read_data12.Data12.lc_email;
$em1 = substr($em,0,1);
$el = strlen($em);
$ep = strpos ($em,"@");
$ep = $ep - 1;
$em2 = substr($em,$ep,$el);
$ec = $em1+"************"+$em2;
echo $ec;
?>
The name of the Custom Code box is EM and in the message body I have used the syntax {var:EM} to show the modified e-mail.
I have also uploaded a screenshot of my chronoform v6 page.
Can someone help me?
- I have a form where the user enter a code "brnnna15..." and press a button;
- CF6 use the code to read a single row in a MySql DB Table, use the data to prepare a e-mail and send it;
- show a message to the user saying "I have found what you have asked with code "brnnna15..." and I have sent a e-mail containing your data to mickeymouse@gmail.com (email address is one of the fields read from the data base);
- this may be a privacy problem so I have to change the message in tihis way: "I have found what you have asked with code "brnnna15..." and I have sent a e-mail containing your data to m**************e@gmail.com.
- I think I can do this using php custom code before showing the message but I am unable to use the e-mail address from the database inside the custom code! I have tried a lot of syntax form but no one seems to work!!! Just as an example I copy here the last attempt:
<?php
$em = read_data12.Data12.lc_email;
$em1 = substr($em,0,1);
$el = strlen($em);
$ep = strpos ($em,"@");
$ep = $ep - 1;
$em2 = substr($em,$ep,$el);
$ec = $em1+"************"+$em2;
echo $ec;
?>
The name of the Custom Code box is EM and in the message body I have used the syntax {var:EM} to show the modified e-mail.
I have also uploaded a screenshot of my chronoform v6 page.
Can someone help me?