Jump to content

Recommended Posts

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?

 

 

Link to comment
https://forums.phpfreaks.com/topic/160657-300-people-cant-solve-this-yet-can-you/
Share on other sites

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 ;)

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.

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

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.

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>";

 

?>

 

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

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.