email - How can I add an image header to my php mail form? -


Then I have a standardized mail form that contains some generated details, along with the header image.
I am trying to learn how to add an image to the text form when I send it.
I have

  $ img_path = 'image12.jpg'; // announcement ($ line = mysql_fetch_array ($ result)) {resonant "& lt; tr & gt;"; $ EmailContent = str_replace ("\\ r \\ n" "", $ line ["generic_email_text"]); Echo 'test'; Echo '& lt; Td width = "450" ​​& gt; & Lt; Textarea name = "genericemail" & gt; '. $ Img_path $ EmailContent '& Lt; / Textarea & gt; & Lt; / Td> '; Echo "& lt; / tr & gt;"; } Resonates "& lt; / tr & gt;"; Echo "& lt; / table & gt; & lt; p & gt;";  

I tried to add img_path to do this but it will not work. I'm moving forward with some ales code which I always find difficult I get it with IMG's name ("Image 12")

And of course, I did not PHP in a while

Here is the PHP to pull the form information

$ fullname = $ FirstName "" $ LastName; $ ImageFile = str_replace = '& lt; Img src = "http://css-tricks.com/examples/WebsiteChangeRequestForm/images/wcrf-header.png" alt = "website change request" /> '; // header is just a placeholder here $ updatedEmailText = str_replace ("% name%", fieldHtmlFormat ($ firstName), $ updatedEmailText); $ UpdatedEmailText = str_replace ("% firstname%", field HTML format ($ firstname), $ updated email text); $ UpdatedEmailText = str_replace ("% lastname%", field HTML format ($ lastName), $ updatedEmailText); $ UpdatedEmailText = str_replace ("% duration%", field HTML format ($ periodoffestay), $ updated email text); $ UpdatedEmailText = str_replace ("% Destination%", Field HTML Format ($ $ ACCSI), $ updated Email Text); $ UpdatedEmailText = str_replace ("% travel%", fieldHalf file format ($ travel), $ updatedEmailText); $ UpdatedEmailText; .

Edit:
Changed code:

  while ($ row = mysql_fetch_array ($ result)) {echo "& lt; tr & gt; ; "; $ EmailContent = str_replace ("\\ r \\ n" "", $ line ["generic_email_text"]); Echo 'test'; // LINE 50 '& lt; Td width = "450" ​​& gt; Textera name = "normal email" & gt; & Lt; Imgsrc = "'. $ Img_path." "/" '. $ EmailContent. ' & Lt; / Textarea & gt; & Lt; / TD & gt; '} // LINE50 echo "& lt; / tr & gt;"; Echo "& lt; / table & gt; & lt; p & gt;";  

you & lt; Img & gt; tag is required

echo & lt; Td width = "450" ​​& gt; & Lt; Textarea name = "normal mail" & gt; . $ Img_path $ EmailContent '& Lt; / Textarea & gt; & Lt; / Td> ';

with this line:

  echo & lt; Td width = "450" ​​& gt; & Lt; Textarea name = "genericemail" & gt; & Lt; Img src = "'. $ Img_path." "/" & Lt '$ emailContent ..'; / Text field & gt; & Lt; / TD & gt; ';  

Also make sure that you have the correct file / URL path for $ img_path .


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -