[code=php]
$query = “SELECT username FROM users WHERE user_id = ‘$_SESSION[user_id]'”;
$result = mysql_query($query) or trigger_error(“Query: $queryn<br />MySQL Error: ” . mysql_error());
$row = mysql_fetch_array($result);
//Send an email.
$message = “Problem is Picture: “.$id.”nn”;
$message.=$_POST[‘problempic’];
$sender = “$row[‘0’]”;
mail (‘[email protected]’, ‘Problem Picture’, $message, ‘From: $sender’);
echo ‘<h3>Thanks for your email. We hope to look into this problem soon.</h3>’;
mysql_close();
How do I insert the users ‘username’ or ’email’ address into the emails ‘From’ part . I tried the above, but it just gives me $
Any ideas would be greatly appreciated.
Thanks once more.