Scud Posted October 22, 2011 Share Posted October 22, 2011 Hi guys; I have created a php form whereby users have the ability to upload a file to the server. After they click the submit button the form input is sent in an email with a path to the uploaded file. Whilst the email provides the direct path to the file it is not linkable. How do i do this. The code which sets the path is; $body .= "\nPath: http://xxx/xxx/xxx/xxx/$target"; How can i change it so the path becomes a link in the email? Link to comment https://forums.phpfreaks.com/topic/249616-sending-a-link/ Share on other sites More sharing options...
Scud Posted October 24, 2011 Author Share Posted October 24, 2011 is this possible? Link to comment https://forums.phpfreaks.com/topic/249616-sending-a-link/#findComment-1281722 Share on other sites More sharing options...
WebStyles Posted October 24, 2011 Share Posted October 24, 2011 most emails will detect that anything starting with http:// is actually a link, and they should do this automatically for you. You can however sent html emails where you would add the html code to link it: $body .= "\nPath: <a href=\"http://xxx/xxx/xxx/xxx/$target\">http://xxx/xxx/xxx/xxx/$target</a>"; hop this helps Link to comment https://forums.phpfreaks.com/topic/249616-sending-a-link/#findComment-1281726 Share on other sites More sharing options...
Scud Posted October 24, 2011 Author Share Posted October 24, 2011 similar to above, that code simply sends the path in the email with the <a href> tag around it. It is still not a link, strangely. Link to comment https://forums.phpfreaks.com/topic/249616-sending-a-link/#findComment-1281927 Share on other sites More sharing options...
Scud Posted October 26, 2011 Author Share Posted October 26, 2011 Anyway to change the code to make the path in the email linkable? Link to comment https://forums.phpfreaks.com/topic/249616-sending-a-link/#findComment-1282328 Share on other sites More sharing options...
Buddski Posted October 26, 2011 Share Posted October 26, 2011 From the looks of the one line of code you posted, you are sending a plain text email. To do what WebStyles is suggesting you will need to send html emails. Link to comment https://forums.phpfreaks.com/topic/249616-sending-a-link/#findComment-1282332 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.