Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
how to send a photo file with a form & php
Old 12-30-2008, 03:45 PM how to send a photo file with a form & php
magicvw's Avatar
Extreme Talker

Latest Blog Post:
Ye Olde Christmas Music
Posts: 235
Name: Vicky
Location: Brit in Bulgaria
Trades: 1
Taking my first baby steps with PHP so please be gentle!

I have managed to get a form working which emails me data entered into an html form. I used php to take the info and email it to me. Everything works ok except for the file upload bit - I want users to be able to send a photo. When I get the email, I just get the file name of the photo, rather than the photo itself. I have put enctype="multipart/form-data" on the form and used the "file" type, but there must be something else I need to do?

I'm not bothered about validating for type of file, size or any of that (for now, anyway). Everything I google gives me tonnes of script full of validation code and I can't dig out the crucial part - how to get the darned photo!

__________________

Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
magicvw is offline
Reply With Quote
View Public Profile Visit magicvw's homepage!
 
 
Register now for full access!
Old 12-30-2008, 03:57 PM Re: how to send a photo file with a form & php
Novice Talker

Posts: 7
Name: Alex
Trades: 0
Are you trying to attach the picture to the email, or just display the picture in the email?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
effektz is offline
Reply With Quote
View Public Profile
 
Old 12-30-2008, 03:58 PM Re: how to send a photo file with a form & php
magicvw's Avatar
Extreme Talker

Latest Blog Post:
Ye Olde Christmas Music
Posts: 235
Name: Vicky
Location: Brit in Bulgaria
Trades: 1
either - as long as I can then download it to my pc, it doesn't matter (or does it?)
__________________

Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
magicvw is offline
Reply With Quote
View Public Profile Visit magicvw's homepage!
 
Old 12-30-2008, 06:01 PM Re: how to send a photo file with a form & php
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.sitepoint.com/print/advanced-email-php/

scroll down to Attachments
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-30-2008, 08:34 PM Re: how to send a photo file with a form & php
Novice Talker

Posts: 5
Name: Phi Van Nam
Location: HCM - VietNam
Trades: 0
Quote:
Originally Posted by chrishirst View Post
thank for sharing information. It is usefull. I learn this tutorial more
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
thietkedepcom is offline
Reply With Quote
View Public Profile Visit thietkedepcom's homepage!
 
Old 12-30-2008, 09:04 PM Re: how to send a photo file with a form & php
Novice Talker

Posts: 7
Name: Alex
Trades: 0
You can also upload the image to your webserver and just as an <img src=""> to the email to display it
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
effektz is offline
Reply With Quote
View Public Profile
 
Old 01-02-2009, 04:25 PM Re: how to send a photo file with a form & php
anderswc's Avatar
Super Talker

Posts: 132
Name: Will Anderson
Location: Terre Haute, IN
Trades: 0
effektz. most email clients aren't happy with "external" objects because they can be used to track emails (i.e. spammers can use them to determine whether an email is valid before flooding your inbox with junk).
attaching an image us usually a better bet.

either way though, it's often a good idea to add a link that says something like "page not displaying properly? click here to view it in a web browser".
__________________
Will Anderson

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
anderswc is offline
Reply With Quote
View Public Profile Visit anderswc's homepage!
 
Old 01-02-2009, 04:29 PM Re: how to send a photo file with a form & php
magicvw's Avatar
Extreme Talker

Latest Blog Post:
Ye Olde Christmas Music
Posts: 235
Name: Vicky
Location: Brit in Bulgaria
Trades: 1
Thanks for the tips. Chris I read through that page and tried it out but didn't succeed

PHP hurts my head
__________________

Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
magicvw is offline
Reply With Quote
View Public Profile Visit magicvw's homepage!
 
Reply     « Reply to how to send a photo file with a form & php
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28010 seconds with 12 queries