Dynamic Content into mail() $message
<p>I'm just trying to put together a simple HTML email confirming an order to my database.</p>

<p>My $message looks a little like:</p>

<pre><code>$message = "
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Whatever&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;

etc etc
&lt;/body&gt;
&lt;/html&gt;
";
</code></pre>

<p>What i want to do within the $message HTML is make a call to my database which will return rows something like:</p>

<pre><code>$emailinfo=mysql_fetch_assoc($result) or die(mysql_error()); 
</code></pre>

<p>To which i can then use in my $message along the lines of:</p>

<pre><code>&lt;p&gt;&lt;?php echo $emailinfo['customername'];?&gt;&lt;/p&gt;
</code></pre>

<p>There's nothing wrong with my query or my tables etc, the problem i'm having and need help with is getting the results from mysql_fetch_assoc into my $message html.</p>

<p>Can anyone help?</p>

<p>Thanks
Dan</p>
