title: How to send HTML Dynamic Table as mail in php?
body: <p>Here i have a code  like getting the data from index.php , if user enter the data it will show like table and as well as it should go to email to some predefined mail. But here i  am getting data Dynamically , i tried with $_REQUEST and $_POST both methods to get the data , but in mail function i am trying to change message parameter but by php tags its is not taking and showing some syntax errors.</p>
  
  <p>please go through code here </p>
  
  <pre><code>&lt;?php
  $to="xxxxxxx@gmail.com";
  $fn="Fisrt Name";
  $ln="Last Name";
  $name=$fn.' '.$ln;
  $from="xxxxx@xxx.com";
  $subject = "Welcome to Website";
  
  include('newsmtp/smtpwork.php');
  
   ?&gt;
   &lt;?php
  
   $message = 'Dear $firstName, 
  
  
   Your Welcome Message.'.'
   &lt;table border=1&gt;
  
      &lt;tr&gt;
          &lt;td&gt;First Name:&lt;/td&gt;
          &lt;td&gt;&lt;?php $firstName=$_POST['firstname'];
          echo $firstName;?&gt;&lt;/td&gt;
      &lt;/tr&gt;
  
      &lt;tr&gt;
          &lt;td&gt;Last Name:&lt;/td&gt;
          &lt;td&gt;&lt;?php $lastname=$_POST['lastname'];
          echo $lastname;?&gt;&lt;/td&gt;
  
      &lt;/tr&gt;
  
      &lt;tr&gt;
  
          &lt;td&gt;Title:&lt;/td&gt;
          &lt;td&gt;&lt;?php $title=$_POST['title'];
          echo $title;?&gt;&lt;/td&gt;
      &lt;/tr&gt;
  
      &lt;tr&gt;
  
          &lt;td&gt;Address:&lt;/td&gt;
          &lt;td&gt;&lt;?php $address=$_POST['address'];
          echo $address;?&gt;&lt;/td&gt;
      &lt;/tr&gt;
  
      &lt;tr&gt;
  
          &lt;td&gt;Phone Number:&lt;/td&gt;
          &lt;td&gt;&lt;?php $phone=$_POST['phone'];
          echo $phone;?&gt;&lt;/td&gt;
      &lt;/tr&gt;
  
  
      &lt;tr&gt;
  
          &lt;td&gt;Course Name:&lt;/td&gt;
          &lt;td&gt;&lt;?php $course=$_POST['coursename'];
          echo $course;?&gt;&lt;/td&gt;
  
      &lt;/tr&gt;
  
      &lt;tr&gt;
  
          &lt;td&gt;Website:&lt;/td&gt;
          &lt;td&gt;&lt;?php $website=$_POST['website'];
          echo $website;?&gt;&lt;/td&gt;
  
      &lt;/tr&gt;
  
  &lt;/table&gt;
  
  Thanks
  xxxxxxxxxxxx
  ';
  ?&gt; 
  </code></pre>