caige Posted June 2, 2009 Share Posted June 2, 2009 Not a joke I have place many posts on other forums for some help on how to create a contact form with a picture upload tool for my clients to upload photos and have it sent to my email! ...I think the challenge here is I am using yahoo small business host and they are picky. Any one? Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/ Share on other sites More sharing options...
gevans Posted June 2, 2009 Share Posted June 2, 2009 First point, yahoo small business is closing down soon, I'd start looking for new hosting and then tackle the problem with far more ease! Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-847854 Share on other sites More sharing options...
gevans Posted June 2, 2009 Share Posted June 2, 2009 Secondly, Seeing as you've been trying for so long I'd imagine you've figured out how to upload an image with a form and php. If not a simple example can be found on the php website; http://uk2.php.net/manual/en/features.file-upload.post-method.php Following that, you need to build and send an email with the image attached. This is a very simple and perfectly structured example; http://www.webcheatsheet.com/PHP/send_email_text_html_attachment.php#attachment If you can't get your process to work with those two links the problem is either yahoo or you, not the people helping you Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-847859 Share on other sites More sharing options...
Maq Posted June 2, 2009 Share Posted June 2, 2009 Not a joke I have place many posts on other forums for some help on how to create a contact form with a picture upload tool for my clients to upload photos and have it sent to my email! ...I think the challenge here is I am using yahoo small business host and they are picky. Any one? What exactly are you stuck on? There are plenty of identical examples/questions on phpfreaks with the regards to contact forms and uploading. Start with creating a basic contact form, then move on to the upload part. Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-847870 Share on other sites More sharing options...
caige Posted June 2, 2009 Author Share Posted June 2, 2009 Thank you every one, gevans I am going to check out the links you gave and give them a try. I have used codes from php.net however what is happening are two things, the file does upload however when I open my file manager and open the file i get a 403 forbidden message. and the contact form does come to my email but the photo does not show. I think the links you gave will help with this. Thank you all again. any other suggestions are welcome. Thanks Caige Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-847891 Share on other sites More sharing options...
gevans Posted June 2, 2009 Share Posted June 2, 2009 If you're getting a 403 error you may want to look at the chmod settings of the file. Once it's uploaded check it, then change it to whatever is required Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-847926 Share on other sites More sharing options...
caige Posted June 2, 2009 Author Share Posted June 2, 2009 I have just about got it, the email with all forms are going to my email 100% correctly...I still can't figure out what I need to do with the http://www.webcheatsheet.com/PHP/send_email_text_html_attachment.php#attachment. It gives great examples but not sure if it is linked to the file or placed in the html page. Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-848060 Share on other sites More sharing options...
caige Posted June 3, 2009 Author Share Posted June 3, 2009 Okay well thank you every one for your input.... However I have come to find I can draw it but I can't php it. So Off to hire a pro.... Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-848339 Share on other sites More sharing options...
gevans Posted June 3, 2009 Share Posted June 3, 2009 How far have you got, post your script, what's happening and what's left to do? Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-848412 Share on other sites More sharing options...
caige Posted June 3, 2009 Author Share Posted June 3, 2009 This is the code I am working with from php.net <?php $uploaddir = 'uploads/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); echo '<pre>'; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else { echo "Possible file upload attack!\n"; } echo 'Here is some more debugging info:'; print_r($_FILES); print "</pre>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-848757 Share on other sites More sharing options...
caige Posted June 3, 2009 Author Share Posted June 3, 2009 This is the html <!-- The data encoding type, enctype, MUST be specified as below --> <form enctype="multipart/form-data" action="www.Ichangedmywebaddresshere.com/uploader.php" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> <!-- Name of input element determines name in $_FILES array --> Send this file: <input name="userfile" type="file" /> <input type="submit" value="Send File" /> </form> I know its me, just don't know what I am doing Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-848761 Share on other sites More sharing options...
ldougherty Posted June 3, 2009 Share Posted June 3, 2009 What exactly happens when you try and upload using that script? Make sure your host has upload_tmp_dir set in your php.ini and that the path is writeable as well. Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-848773 Share on other sites More sharing options...
caige Posted June 3, 2009 Author Share Posted June 3, 2009 What exactly happens when you try and upload using that script? Make sure your host has upload_tmp_dir set in your php.ini and that the path is writeable as well. Nothing happens i just get a blank page. 1. I don't know if I have put my upload directory address correctly in the script I am going to check on the upload tmp dir now. This my be the issue. Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-848795 Share on other sites More sharing options...
MadTechie Posted June 3, 2009 Share Posted June 3, 2009 Whenever, i see a post with a subject like this, it reminds me of my a sales manager i know, every project his involved with goes wrong, now is it the people around him that mess it up ? Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-848803 Share on other sites More sharing options...
caige Posted June 3, 2009 Author Share Posted June 3, 2009 Okay so this is what I found... this link gave me a code that will actually get the file/picture to my storage... www.uk2.php.net/file-upload Now I am getting a forbidden 403 when I open it, is this a server issue or my stupidity again???? Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-848904 Share on other sites More sharing options...
benphelps Posted June 4, 2009 Share Posted June 4, 2009 These 300 people, did they have painted on abs, wearing shields and holding swords? If so, I doubt they would be of much help in this category, if you needed to save Sparta, then they might be of some help. Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-848906 Share on other sites More sharing options...
gevans Posted June 4, 2009 Share Posted June 4, 2009 If you're getting a 403 error you may want to look at the chmod settings of the file. Once it's uploaded check it, then change it to whatever is required Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-848907 Share on other sites More sharing options...
ldougherty Posted June 4, 2009 Share Posted June 4, 2009 The default permissions on the uploaded file are likely not readable, try chmod 644 to see if this lets you see the file, if it doesn't then 755 Quote Link to comment https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/#findComment-848926 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.