954,153 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Hi suomedia

I used the script that you said i should place on the path so the files are sent to server but it gives a error saying unexpected T_CONSTANT_ENCAPSED_STRING IN the php file...... What could be the problem now ?

Vity
Light Poster
26 posts since Mar 2008
Reputation Points: 10
Solved Threads: 0
 
<?
include "mail_attachment.php";
 ?>
$sent1 = mail_attachment("cgbasket@website.com",$too, $subject1, $body1, $attachment);


u have to include the above code in the file,juct upload the mail_attachment.
u path name should always be as /home/wesite/......start with home then the location of the file

Attachments mail_attachment.php (2.12KB)
queenc
Junior Poster
145 posts since Mar 2008
Reputation Points: 9
Solved Threads: 4
 

Queenc..... Could you please insert examples on the script to show it should look when its completed because i'm not sure what to place where.... Like the uploaders form name i don't know where it goes, the path should it be to the server and so on...... I would be truly greatful if you could place examples on it

Vity
Light Poster
26 posts since Mar 2008
Reputation Points: 10
Solved Threads: 0
 

Hi there suomedia

I have been using your attachment script you gave but i have not been successful to this point. I have tried changing the path in ways including using the example you gave me but still no success....... Please help

Vity
Light Poster
26 posts since Mar 2008
Reputation Points: 10
Solved Threads: 0
 

Mr. suomedia,
I am using windows with WAMP with includes the follwing:
1. PHP 5 ...
2. MySQL ...
3. Apache2 ...

I myself interested in this issue, so I decided to know this problem too, so I did everything what you mentioned in the previous posts, and I don't see any error too. BUT the page 'SignUpFailure.html' contents.

I shall be glad if you shall have a view of the attachment ...

NOTE:
Should be mention, that I am using everything locally on my own computer, it means that I configured a 'mail server', and I can send and receive emails through PHP mail function...

Attachments mail_attachment.zip (3.35KB)
tanha
Posting Whiz in Training
218 posts since Aug 2007
Reputation Points: 8
Solved Threads: 1
 
<?
include "mail_attachment.php";
 ?>
$sent1 = mail_attachment("cgbasket@website.com",$too, $subject1, $body1, $attachment);

u have to include the above code in the file,juct upload the mail_attachment. u path name should always be as /home/wesite/......start with home then the location of the file


Mr. queenc queenc,
I am using Windows with WAMP server ..., and I used the code you posted, I can receive the mail, also I have the attachment in my mail box, but I can not open it.
Also I see the Sorry ... PROMPT after sending the mail ...

Could you please see what is wrong ???

Attachments attachment2.zip (18.82KB) mail.JPG 24.35KB
tanha
Posting Whiz in Training
218 posts since Aug 2007
Reputation Points: 8
Solved Threads: 1
 

I think the only problem that you have is that you have not respected the case sensitivity of variables, eg, in your form you have the file field named as "Picture" whereas in the processing script it is "picture", eg. $_FILES['picture']['tmp_name']

The two are NOT the same and for this reason it will never work as it is.


Matti Ressler
Suomedia

Suomedia
Junior Poster
158 posts since Mar 2008
Reputation Points: 15
Solved Threads: 19
 

Thanks for replying,
I changes it to lower case, and again the same problem, mentioned in above.
could u plz test it once ???
Thanks

tanha
Posting Whiz in Training
218 posts since Aug 2007
Reputation Points: 8
Solved Threads: 1
 

Is there an alternative php script that i can use to send files with using form ...... Somebody can you please help me !?

Vity
Light Poster
26 posts since Mar 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You