kat32 Posted April 5, 2009 Share Posted April 5, 2009 <?php include('config.php'); $query = mysql_query("SELECT topics.topictitle, users.email FROM topics LEFT JOIN users ON topics.userid=users.userid WHERE topics.topicid=1") or die(mysql_error()); $row = mysql_fetch_array($query); $Name = "kat"; //senders name $sender_email = "[email protected]"; //senders e-mail adress $topictitle=$row['topictitle']; $email=$row['email']; $header = "From: ". $Name . " <" . $sender_email . ">\r\n"; $subject = "this is the subject"; $qry = mysql_query("SELECT emailmsg FROM emails WHERE emailmsgid=1") or die(mysql_error()); $row = mysql_fetch_array($qry); $emailmsg=$row['emailmsg']; $body=$emailmsg; $sent = mail($email, $subject, $body, $header); if($sent){ echo 'sent'; } ?> here's the body of email This is the $topictitle, more text here. I want to display the topic title after "This is the". The problem is I can't display the topictitle, please help me. thanks in advance. Link to comment https://forums.phpfreaks.com/topic/152630-solved-cant-display-topic-title-in-email/ Share on other sites More sharing options...
Yesideez Posted April 5, 2009 Share Posted April 5, 2009 $subject = "this is the ".$topictitle; Link to comment https://forums.phpfreaks.com/topic/152630-solved-cant-display-topic-title-in-email/#findComment-801575 Share on other sites More sharing options...
kat32 Posted April 5, 2009 Author Share Posted April 5, 2009 problem solved, thanks . Link to comment https://forums.phpfreaks.com/topic/152630-solved-cant-display-topic-title-in-email/#findComment-801629 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.