5, December 2008

easy upload along with attachment mailer script - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Easy PHP Upload (Moderator: Olaf)
Topic: easy upload along with attachment mailer script
« previous next »
Pages: [1] Print

Author Topic: easy upload along with attachment mailer script  (Read 818 times)
Just another rainy day
*
Posts: 1
10 credits
Members referred : 0


« on: May 16, 2006, 08:13:33 PM »

I downloaded your easy upload and attachment mailer scripts.  I got the multi upload example to work with no alterations except assigning the path and extensions to allow.


then I made a duplicate and I tried to use the upload and mail example but couldn\'t get it to work with multiple uploads.  there was no example for multi uploads and attachments.

I added these lines of code to the upload_multi_files function inside the if statement for move_upload
------------------------------------------
$full_path = $this->file_copy;
       $my_mail->create_attachment_part($full_path);
$my_mail->process_mail();
$my_mail->del_temp_file($full_path);

--------------------------------------------------------

but when I run the test I get this error message

Fatal error: Call to a member function on a non-object in ............\\multi_file_mailer.php on line 53

thanks for your help
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6487
39754 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: May 16, 2006, 08:52:31 PM »

Hello,

check this code from the example:
Code:
<?php
if ($my_upload->upload()) {
$full_path $my_upload->upload_dir.$my_upload->file_copy;
$my_mail->create_attachment_part($full_path);
$my_mail->process_mail();
$my_upload->del_temp_file($full_path); // the file is not needed anymore
}
$full_path is the (single) uploaded file. This path is used in the next ro to build an attachment.

I don't think that easy for you to use the multi file upload for sending more than one attachement.

I think its easier to have the code for the single upload x times. In this case you need to create x objects.

It looks like that handling classes is your problem, maybe its time to learn something about objects:
http://nl3.php.net/manual/en/language.oop.php Visit through proxy


Last blog : Just a better Internet portal provided by Google
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=2516
Tags : email Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Easy PHP Upload (Moderator: Olaf)
Topic: easy upload along with attachment mailer script
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Dec 05, 2008, 07:31:53 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 38.003
Total Topics: 7.685
Total Members: 4.472
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: xeroxss

48 Guests, 2 Users online :

11 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.