[RESOLVED] Send a MySQL row via email
I'm building a feedback system & I'm trying to get emailing to work.
What I'm trying to do:
1- I press the Mail icon on the comment I want emailed.
2- The comment gets emailed to me.
What the problem is, I can get it to send successfully with everything but the body working. Here's my code:
* the $id is set in by mail.php?id=xx. The id is of the comment I chose.
$query = "SELECT message from visitordata where id='".$id."'";
$to = "email@example.com";
$subject = "Your feedback, sir.";
$body = "Here's the feedback you requested:<br />".mysql_query($query)."";
mail($to, $subject, $body);
Here's the body of what it comes out as:
"Here's the feedback you requested:<br />Resource id #7"
How can I get this to work?