title: php echo to "html page"
body: <p>Today's predicament is in the form of php.This 'send_contact' script is pretty basic stuff really, however, as opposed to simply echo a message.we'd like to echo or redirect to a lovely styled html page.</p>
  
  <pre><code>    &lt;?php
      // Contact Subject
      $fullname = $_POST["full_name"];
      // Details
      $businessname = $_POST["business_name"];
      $addressline1 = $_POST["address_line_1"];
  
  
      //HTML email
      $headers = "MIME-Version: 1.0" . "\r\n";
      $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
      // Mail of Sender
      $mail_from = $_POST["email_addr"];
      //From
      $headers .="from: &lt;".$mail_from."&gt;";
  
      //Enter your email address
      $to ="mywifelovesphp@php.co.uk";
      $subject = "Catalogue Request - ".date("d/m/Y");
      $message = "&lt;html&gt; &lt;body&gt;";
      $message .= "&lt;h3&gt;".$businessname."&lt;/h3&gt;\r\n";
      $message .= $fullname."\r\n";
      $message .= $addressline1."\r\n";
      $message .= "&lt;/body&gt;&lt;/html&gt;";
  
      $send_contact=mail($to,$subject,$message,$headers);
  
  
      //Check, if message sent to your email
      //display message "We've recieved your information"
      if($send_contact)
      {echo "We've recieved your information";
      }
  else {
  echo "Error";
  }   
      ?&gt;
  </code></pre>