Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Can someone please help with this code?


Recommended Posts

I have the Tell_A_Friend_Too contribution installed. On the form it creates, it shows that only the TO NAME and TO EMAIL are required. However if I don't include the from information, the received email has an empty subject line. Including the FROM information causes it to create a good email. In the tell_a_friend.php file, there is the following code:

  $to_email_address = tep_db_prepare_input($HTTP_POST_VARS['to_email_address']);
   $to_name = tep_db_prepare_input($HTTP_POST_VARS['to_name']);
   $from_email_address = tep_db_prepare_input($HTTP_POST_VARS['from_email_address']);
   $from_name = tep_db_prepare_input($HTTP_POST_VARS['from_name']);
   $message = tep_db_prepare_input($HTTP_POST_VARS['message']);

   if (empty($from_name)) {
       $error = true;

       $messageStack -> add('friend', ERROR_FROM_NAME);
   if (!tep_validate_email($from_email_address)) {
       $error = true;

       $messageStack -> add('friend', ERROR_FROM_ADDRESS);

   if (empty($to_name)) {
       $error = true;

       $messageStack -> add('friend', ERROR_TO_NAME);

   if (!tep_validate_email($to_email_address)) {
       $error = true;

       $messageStack -> add('friend', ERROR_TO_ADDRESS);

So it appears that all of the fields are being checked. If I don't input the TO data, I get an error but it never sees the FROM data is missing. Does anyone have any idea what might be happening here? Can someone verifies this happens?



Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...