title: Using $POST Variables with Spaces
body: <p>I am using a PHP page to construct an email.  Part of the email text is provided by $POST variables from an ealier page.  Some of the variables contain spaces, which is causing the strings to truncate to a single word in my email.  Any syntax ideas on how to get the whole string into the text of my email?  ' . $_POST['VariableName'] . ' is obviously not working.</p>
  
  <pre><code>$message = '
  &lt;html&gt;
  &lt;HEAD&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;EuroClassic Transfer Notice&lt;/title&gt;
  &lt;/HEAD&gt;
  
  &lt;body bgcolor="#F5EEDB"&gt;
  
  &lt;TABLE ID=hor-minimalist-b SUMMARY=EuroClassic Customer&gt;
  &lt;THEAD&gt;
  &lt;TR&gt;
  &lt;TH colspan=4 scope=col&gt;Shipping Logistics:&lt;/th&gt;
  &lt;/TR&gt;
  &lt;/THEAD&gt;
  &lt;TBODY&gt;
  
  &lt;TR&gt;
  &lt;TD&gt;Shipping From: &lt;/TD&gt;
  &lt;TD&gt;&lt;INPUT type=text size=35 name=from value=' . $_POST['from'] . '&gt;&lt;/TD&gt;
  &lt;TD&gt;Shipping To: &lt;/TD&gt;
  &lt;TD&gt;&lt;INPUT type=text size=35 name=ToLocation value=' . $_POST['ToLocation'] . '&gt;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR&gt;
  &lt;TD&gt;PO Number: &lt;/TD&gt;
  &lt;TD&gt;&lt;INPUT type=text size=20 name=PO value=' . $_POST['PO'] . '&gt;&lt;/TD&gt;
  &lt;TD&gt;Address: &lt;/TD&gt;
  &lt;TD&gt;&lt;INPUT type=text size=35 name=address value=' . $_POST['address'] . '&gt;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR&gt;
  &lt;TD&gt;Ship Date: &lt;/TD&gt;
  &lt;TD&gt;&lt;INPUT type=text size=20 name=ShipDate value=' . $_POST['ShipDate'] . '&gt;&lt;/TD&gt;
  &lt;TD&gt;City/State/ZIP: &lt;/TD&gt;
  &lt;TD&gt;&lt;INPUT type=text size=35 name=city value=' . $_POST['city'] . '&gt;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR&gt;
  &lt;TD&gt;Arrival Date: &lt;/TD&gt;
  &lt;TD&gt;&lt;INPUT type=text size=20 name=ArrivalDate value=' . $_POST['ArrivalDate'] . '&gt;&lt;/TD&gt;
  &lt;TD&gt;Freight: &lt;/TD&gt;
  &lt;TD&gt;&lt;INPUT type=text size=20 name=cost value=' . $_POST['cost'] . '&gt;&lt;/TD&gt;
  &lt;/TR&gt;
  &lt;/TBODY&gt;
  &lt;/TABLE&gt;
  
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  ';
  </code></pre>