volkswest Posted April 17, 2007 Share Posted April 17, 2007 I have a php site and need to get my logo inserted into the registration email that is sent to the person registering, I have the following code that sends the email out <? require_once("conn.php"); require_once("includes.php"); if(isset($_POST[s1])) { $q1 = "insert into classmates_members set username = '$_POST[NewUsername]', password = '$_POST[p1]', CurrentName = '$_POST[CurrentName]', FormerName = '$_POST[FormerName]', SchoolName = '$_POST[schoolName]', SchoolType = '$_POST[stype]', SchoolCity = '$_POST[schoolCity]', SchoolState = '$_POST[schoolState]', country = '$_POST[country]', single_married = '$_POST[single_married]', residing = '$_POST[residing]', occupation = '$_POST[occupation]', year = '$_POST[year]', email = '$_POST', about = '$_POST[about]', RegDate = '$t' "; mysql_query($q1) or die(mysql_error()); if(mysql_error()) { $error = "<span class=RedLink>The username <span class=BlackLink>$_POST[NewUsername]</span> is already in use!<br>Select another one, please!</span>"; unset($_POST[NewUsername]); } else { $last = mysql_insert_id(); $_SESSION[MemberID] = $last; $to = $_POST; $subject = "Your login infomation"; $message = "Hello $_POST[CurrentName],\nYour login details are below:\n\nUsername: $_POST[NewUsername]\nPassword: $_POST[p1]\n\nhttp://$_SERVER[HTTP_HOST]"; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\n"; $headers .= "Content-Transfer-Encoding: 8bit\n"; $headers .= "From: $_SERVER[HTTP_HOST] <$aset[ContactEmail]>\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSMail-Priority: High\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\n"; mail($to, $subject, $message, $headers); header("location:prices.php"); exit(); } } //get the templates require_once("templates/HeaderTemplate.php"); require_once("templates/RegistrationTemplate.php"); require_once("templates/FooterTemplate.php"); ?> Link to comment https://forums.phpfreaks.com/topic/47456-php-code-required-urgent/ Share on other sites More sharing options...
AndyB Posted April 17, 2007 Share Posted April 17, 2007 If you want an image included you will have to do two things: #1 - change the mime type to the correct one for html email #2 - include a standard html img src link to the absolute address of the image Link to comment https://forums.phpfreaks.com/topic/47456-php-code-required-urgent/#findComment-231546 Share on other sites More sharing options...
volkswest Posted April 17, 2007 Author Share Posted April 17, 2007 how do i do this as i'm new to php #1 - change the mime type to the correct one for html email #2 - include a standard html img src link to the absolute address of the image Link to comment https://forums.phpfreaks.com/topic/47456-php-code-required-urgent/#findComment-231607 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.