Hello everyone! I am curious as to how I can echo a variable in this line of code: // Body $mailer->Body = 'Thank you for purchasing my Product<br /> Please follow this link: <a href="#">Link Text</a> to complete the registration process.'; Code (markup): I need to echo a value as the link. for instance: // Body $mailer->Body = 'Thank you for purchasing my Product<br /> Please follow this link: <a href="echo $emailaddress">Link Text</a> to complete the registration process.'; Code (markup): I know the syntax is wrong, and I'm wondering if anyone can help me by either letting me know how to fix it, or if there is a link to some info out there, either would be appreciated. Thanks!
$mailer->Body = 'Thank you for purchasing my Product<br /> Please follow this link: <a href="echo $emailaddress">Link Text</a> to complete the registration process.'; to $mailer->Body = 'Thank you for purchasing my Product<br /> Please follow this link: <a href="'.$emailaddress.'">Link Text</a> to complete the registration process.';
Either this $mailer->Body = 'Thank you for purchasing my Product<br /> Please follow this link: <a href="'.$emailaddress.'">Link Text</a> to complete the registration process.'; or $mailer->Body = "Thank you for purchasing my Product<br /> Please follow this link: <a href=\"$emailaddress\">Link Text</a> to complete the registration process.";
Hey all, I appreciate the help with the previous issue, however, now I have the problem with the script not sending a message ... Can anyone help? Here's the code: <?php $product = "BreakTest-2 MM"; $mastermind_link = "Link URL"; $emailaddress = $_POST['email1']; $name = $_POST['name']; if (isset($_POST['product2']) && $_POST['product2'] == $product) { //Bundle is being purchased header('Location:' .$mastermind_link); $send_signup = true; } else { header('Location: http://URL'); } if ($send_signup) { require_once($_SERVER['DOCUMENT_ROOT'].'/config.php'); require_once($_SERVER['DOCUMENT_ROOT'].'/lib/MailClass.inc'); $mailer = new AutoMailer(); // Set the subject $mailer->Subject = 'My Subject'; // Body $mailer->Body = 'Thank you for purchasing my Product<br /> Please follow this link: <a href="'.$mastermind_link.'">Mastermind Sign-up</a> to complete the registration process.'; // Add an address to send to. $mailer->AddAddress($emailaddress, $name); } if(!$mailer->Send()) { echo 'Confirmation email was not sent. Please contact the site administrator to resolve the issue.'; } $mailer->ClearAddresses(); $mailer->ClearAttachments(); ?> Code (markup):
You need to use double quote to put variables in string literals. $mailer->Body = "Thank you for purchasing my Product<br /> Please follow this link: <a href=\"{$emailaddress}\">Link Text</a> to complete the registration process."; PHP: