Reply
print to the confirm screen name and directory attched file?
Old 05-30-2008, 04:45 PM print to the confirm screen name and directory attched file?
Average Talker

Posts: 25
how I print to the confirm form submission screen(php file INCLUDED <?= $fileField; ?>) the name and directory of the submitted(attached to form data) file (eg resume.doc) in visitor's PC(URL) ?
I mean print in the confirm page something like this:
D:\My Docs from C DISK\Email Messages\THIS IS TO TEST EMAIL ATTACHMENT VIA FORM.doc
how ? What to use, what var holds that ?
I can send any file size as attachment ? how I set max limit (attached file) ? To send any file type, I do not refer to individual files just leave it simple, just this ?
lse123 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 05-30-2008, 05:32 PM Re: print to the confirm screen name and directory attched file?
rogem002's Avatar
Webmaster Talker

Posts: 607
Name: Mike
Location: United Kingdom
To get attachments sent via an email, use the following code:
http://uk.php.net/manual/en/function.mail.php#83491
http://pear.php.net/package/Mail_Mime - this is a PEAR library for sending mail.

It's a bit iffy and confusing but it does the job. PHP variables will set the max size of a file, but if you want to check the size is not too bug use the filesize( http://uk.php.net/manual/en/function.filesize.php ) function.

Though, if I were you (to save downloading lots of possible dodgy files) I would saves them somewhere on the server and access them via an FTP.
__________________
Website Services
PHP Code:
if(Added_Talkupation($post) == TRUE){iHug($you);} 
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 05-31-2008, 05:26 AM Re: print to the confirm screen name and directory attched file?
Average Talker

Posts: 25
Please note that I do not want that(I already done send attachment_with included php confirm webpage in the message body) but I want how to refer(print) the url of attached file in user's/visitor's pc to the confirm page...so user knows after submission of form what file actually sent...I must use something like
form page:
<input type="file" name="fileatt" id="fileatt" />
processor file:
$cv = addslashes($_POST['fileatt']);
confirm php page included in confirm and to a confirmation email:
<?php $cv = stripslashes($cv);
echo $cv;?>
I try but no result , nothing appears.... ? form at : http://www.ancientgreekdramainstitut....org/apply.htm
lse123 is offline
Reply With Quote
View Public Profile
 
Old 06-01-2008, 06:17 PM Re: print to the confirm screen name and directory attched file?
Average Talker

Posts: 25
When I send html form file attachments there's a $_files array , well what element of this array(['XXXX'] below) gives the URL of the attached file in visitor's HDD ?

Send this file: <input name="userfile" type="file" />

$url = $_FILES['userfile']['XXXX']
lse123 is offline
Reply With Quote
View Public Profile
 
Old 06-03-2008, 04:04 AM Re: print to the confirm screen name and directory attched file?
Average Talker

Posts: 25
I try to use $_POST['userfile'];
But work only when attachment do not sent and $_FILES array non present, what to do to work again with attachment to be sent and $_FILES present ? What to use about addslashes/stripslashes ?
lse123 is offline
Reply With Quote
View Public Profile
 
Old 06-03-2008, 02:40 PM Re: print to the confirm screen name and directory attched file?
Average Talker

Posts: 25
you mean $_post['fileatt'] do not work , when I use $_FILES array ?
the forward / backward slashes in the URL how to escape ? Is any way finally, appear the url ? use javascript to copy the url to a HIDDEN field UPON SUBMISSION ?
lse123 is offline
Reply With Quote
View Public Profile
 
Old 06-03-2008, 05:02 PM Re: print to the confirm screen name and directory attched file?
Average Talker

Posts: 25
in the confirm page visitor sees what file actually submited as attachment ... also sees that and to confirm email goes to him & owner of site ... just this left, all others work fine:
http://www.ancientgreekdramainstitut....org/apply.htm
lse123 is offline
Reply With Quote
View Public Profile
 
Old 06-08-2008, 03:15 PM Re: print to the confirm screen name and directory attched file?
Average Talker

Posts: 25
I get this in confirm page(&email message) of a form(from attach fileField):
D:\\My Docs from C DISK\\Email Messages\\THIS IS TO TEST EMAIL ATTACHMENT VIA FORM.doc
well input(to html fileField box) is:
D:\My Docs from C DISK\Email Messages\THIS IS TO TEST EMAIL ATTACHMENT VIA FORM.doc
what to do to get the correct ? I do not know the settings in server for slashes ...
>form
<input type="hidden" name="fileurl" id="fileurl" />
<input type="file" name="fileatt" id="fileatt" /> i copy with js to above^
>processor
$cv = $_POST['fileurl'];
>confirm
echo $cv;
lse123 is offline
Reply With Quote
View Public Profile
 
Old 06-08-2008, 03:18 PM Re: print to the confirm screen name and directory attched file?
Average Talker

Posts: 25
http://www.ancientgreekdramainstitut....org/apply.htm
email come to you
lse123 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to print to the confirm screen name and directory attched file?
 

Thread Tools

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

vB 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.16483 seconds with 12 queries