-1

Below is my php code , i am trying to add email variable inside the body and sent email but whenever i try to run the file i cant ? why ? and if i remove the variable that is of email the file runs properly ? how can i solve it?

$body='<img src="images\logo.jpg" alt="logo"/><br/>Howdy, <br/> <br/> We need to make sure         you are human,Please verify your email,To confirm your order with us!.<br/><b>Happy Shopping!   </b> <br/> <br/> <a href="'.$base_url.'activation/'.$activation.'">'.$base_url.'activation/'.$activation.'</a><br/><br/>Best Regards,<br/>Zenolaps.com<br/>This Email Was Sent To"' echo $email'"';
  • If you're getting an error, could you add it to the question? Though you might want to look up how to do string concatenation in PHP, as well as the difference between single and double quoted strings – andrewsi Dec 10 '13 at 15:55

2 Answers2

0
  1. Change echo $email to '.$email;

  2. Turn on error reporting as it will tell you what's wrong. AAlways have error reporting turned on to show all errors during development.

Community
  • 1
  • 1
John Conde
  • 217,595
  • 99
  • 455
  • 496
0

Added concatenation This Email Was Sent To '.$email;

  $body='<img src="images\logo.jpg" alt="logo"/><br/>Howdy, <br/> <br/> We need to make sure         you are human,Please verify your email,To confirm your order with us!.<br/><b>Happy Shopping!   </b> <br/> <br/> <a href="'.$base_url.'activation/'.$activation.'">'.$base_url.'activation/'.$activation.'</a><br/><br/>Best Regards,<br/>Zenolaps.com<br/>This Email Was Sent To  '.$email;
Krish R
  • 22,583
  • 7
  • 50
  • 59