mail() values not being sent
<p>Here's a little problem for which I believe the answer is quite simple but maybe I cannot see the wood for the trees:</p>

<p>I have a form which displays data; the user is asked to edit the data which, in turn, updates the database and sends an email with the updated data. The email arrives but although it displays the titles does not display the data.</p>

<p>What am I doing wrong?</p>

<p>Text shown in email:</p>

<p>Name:<br>
Email:<br>
Phone:  </p>

<p>php code:</p>

<pre><code>$email_to = 'someone@here.com';
$name=$row['name'];
$email=$row['email'];
$phone=$row['mobtel'];
$email_subject = 'Feedback from website';
$headers = 'From: someone@there.com\r\n';

someone$message='Name:  ' .$name. "\r\n". 'Email:  ' .$email. "\r\n". 'Phone:  ' .$phone;


$sent = mail($email_to, $email_subject, $message, $headers);


 if($sent) 
 {print "Your mail was sent successfully"; }
 else 
 {print "We encountered an error sending your mail"; }
</code></pre>

<p>This is the php code that preceeds the above:</p>

<pre><code>mysql_connect($dbhost, $dbuser, $dbpass) or die(mysql_error());
    mysql_select_db($dbname) or die("Unable to connect: " . mysql_error());

    if (isset($_GET['view']))
    {
    $user = sanitizeString($_GET['view']);




    $data = "SELECT * FROM names WHERE id='$user'";
    $result=mysql_query($data) or die(mysql_error());

    while($row=mysql_fetch_array($result)){
</code></pre>

<p>?><br>
    <br />
        <br />
    </p>

<pre><code>    &lt;caption&gt;Personal Record&lt;/caption&gt;

&lt;tr&gt;
&lt;th&gt;ID&lt;/th&gt;
    &lt;td&gt;&lt;?php
        echo $row['id'];
     ?&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
    &lt;td&gt;&lt;?php
        echo $row['name'];
     ?&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;th&gt;E-Mail&lt;/th&gt;
    &lt;td&gt;&lt;?php
        echo $row['email'];
     ?&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;th&gt;Main Telephone&lt;/th&gt;
    &lt;td&gt;&lt;?php
        echo $row['maintel'];
     ?&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;th&gt;Mobile Telephone&lt;/th&gt;
    &lt;td&gt;&lt;?php
        echo $row['mobtel'];
     ?&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;th&gt;Organisation&lt;/th&gt;
    &lt;td&gt;&lt;?php
        echo $row['organisation'];
     ?&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;th&gt;Group Leader&lt;/th&gt;
    &lt;td&gt;&lt;?php
        echo $row['group_leader'];
     ?&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;th&gt;Supervisor&lt;/th&gt;
    &lt;td&gt;&lt;?php
        echo $row['supervisor'];
     ?&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;th&gt;Volunteer&lt;/th&gt;
    &lt;td&gt;&lt;?php
        echo $row['volunteer'];
     ?&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;th&gt;Assessor&lt;/th&gt;
    &lt;td&gt;&lt;?php
        echo $row['assessor'];

        }
        }
     ?&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;/table&gt;


    &lt;br /&gt;
    &lt;form method="post" action="update.php"&gt;
        &lt;input name="Submit1" type="submit" value="Edit" style="width: 67px" /&gt;&lt;/form&gt;

    &lt;p&gt;&amp;nbsp;&lt;/p&gt;
</code></pre>
