User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » PHP Q: online form - html upload to message body Page [1]  
quagmire02
All American
44225 Posts
user info
edit post

i'd like to have an online form in PHP that allows me to upload an HTML file and put THAT into the message body of the sent email...does that make sense? the closest thing i can come up with as an example would be a newsletter - you have a newsletter in HTML, but you want to send it to the newsletter email list...it exists on the web (http://www.yoursite.com/newsletter/20071106.html) and you want to embed the HTML into the message body, but just by putting the URL into the upload area of the form

does any of that make sense? it seems to me that it would be pretty easy, but i don't know how to extract the code from the HTML file itself and insert it into the $body of the PHP form to be sent...i've done this as attaching the HTML file to the email, and that works for clients like thunderbird (those that, by default, display attachments in the body of the email)...but not for some other clients

11/6/2007 10:47:02 AM

Stein
All American
19842 Posts
user info
edit post

$body = file_get_contents("filename");

11/6/2007 10:57:54 AM

evan
All American
27701 Posts
user info
edit post

have a big ass text field

copy and paste the html from the file into it

read from $_GLOBALS['your_form_field_name']

set $body = the above

voila

11/6/2007 12:00:36 PM

quagmire02
All American
44225 Posts
user info
edit post

^^ i'll try that out

^ yeah, that's the surefire way to do it, but i'm trying to make this as easy as possible and code will scare the person who's doing this (the secretary at my church)...she understands the upload explorer box, and understands that she can put a URL into the box to have it pull the newsletter from its posted place on the church website

11/6/2007 2:01:34 PM

 Message Boards » Tech Talk » PHP Q: online form - html upload to message body Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.