How to send user detail page to my email.with full deatils
<?php
mysql_connect("localhost","root","");
mysql_select_db("Users");
$mysql_query =("SELECT uid,`Name`,Department,Problem,Ext_no,Ip_Add,Remark,Email FROM entryform ORDER BY entryform.uid DESC limit 1 ");
$result = mysql_query($mysql_query);
while($data = mysql_fetch_row($result)){
echo(" <td >
<tr>
<td> Complaint NO. :- $data[0]</br></br></td>
<td> NAME :- $data[1]</br></br>
</td>
<td> DEPARTMENT :- $data[2] </br></br>
</td>
<td> PROBLEM :-$data[3] </br></br> </td>
<td> EXT. NO.. : $data[4]</br></br> </td>
<td> IP ADDRESS :- $data[5] </br></br> </br>
<td> REMARK :- $data[6] </br></br> </br>
<td> Mail ID :- $data[7] </br></br> </br>
</td>
</tr>
");
}
$to = "support.kaizen@rpr.jspl.com";
$subject = "user complaint!";
$massage = "$result";
if (mail($to, $subject, $massage)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>