graham23s Posted February 9, 2009 Share Posted February 9, 2009 Hi Guys, I currently have a form with a subject,message and send button, but was wondering if it was possible to add an upload field so attachments could be sent? is that possible at all? thanks guys Graham Link to comment https://forums.phpfreaks.com/topic/144547-sending-a-file-as-attachment/ Share on other sites More sharing options...
npsari Posted February 10, 2009 Share Posted February 10, 2009 Why don't you use the normal upload field... print "<form name=\"Upload\" method=\"POST\" action=\"URL_HERE\" enctype=\"multipart/form-data\" id=\"Form\">"; print "<input type=\"file\" id=\"file1\" size=\"20\" name=\"file\">"; print "<FONT style=\"font-size:9px\" color=\"#FFFFFF\" face=\"Arial\"><BR><BR></FONT>"; echo "input type=\"submit\" name=\"SUBMIT\" class=\"bu\" value=\"Upload file\">"; print"</form>"; Won't that work when sending emails? I never tried it actually, i only use it to upload files into my server But i think it will send a file via email Try it, but don't take it for granted Link to comment https://forums.phpfreaks.com/topic/144547-sending-a-file-as-attachment/#findComment-758576 Share on other sites More sharing options...
gunabalans Posted February 10, 2009 Share Posted February 10, 2009 For file uploading refer http://kilinjal.com/index.php?cat=tutorials&sub=php&flag=c&content=File%20upload%20-%20Form&content_id=36 Link to comment https://forums.phpfreaks.com/topic/144547-sending-a-file-as-attachment/#findComment-758732 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.