gspringent Posted July 16, 2008 Share Posted July 16, 2008 I'm been contracted by my employer to help develop a PHP script for a local hospital. Below is an outline of what it needs to do... Script needs to perform the following tasks, respectivley- - Allow for up to ten (10) image uploads to a specified directory - Once images have been uploaded, generate links to said images and e-mail the links to three (3) recipiants as specified in the form - Send confirmation e-mail to the uploader whose address is also specified in the form The image upload isn't a problem. However, I don't know how to have it send an e-mail with the links to the specified addresses. Can anyone help, PLEASE? Quote Link to comment Share on other sites More sharing options...
widox Posted July 16, 2008 Share Posted July 16, 2008 Check out the mail() function. http://us3.php.net/manual/en/function.mail.php Quote Link to comment Share on other sites More sharing options...
gspringent Posted July 16, 2008 Author Share Posted July 16, 2008 That helped with the E-Mail. However, how do I get the filename from the uploaded file into the e-mail? Ex. - I know the image will be uploaded to www.test.com/testimage/ , so how do I insert the file name of the uploaded image after the path in the e-mail? A GET routine? I'm lost here..... Quote Link to comment Share on other sites More sharing options...
widox Posted July 16, 2008 Share Posted July 16, 2008 You should read up on that http://us2.php.net/manual/en/features.file-upload.php Essentially after the file(s) have been uploaded, you can access the file info with the $_FILES global. $_FILES['userfile']['name'] is the name of the file So you can just add that name to the string of your email body and send it along. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.