Current location: Hot Scripts Forums » Programming Languages » PHP » A few questions


A few questions

Reply
  #1 (permalink)  
Old 09-23-04, 04:06 PM
Spreegem Spreegem is offline
Newbie Coder
 
Join Date: Jan 2004
Location: In front of my computer
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
A few questions

1. How would I attach a file to an e-mail using PHP? I already have my e-mail script made, and I can do the HTML part of it for having the user choose the file, but I don't know how to do the PHP part of it to attach it to the e-mail. Any and all help is greatly appreciated.

2. Is there a way to create a new directory with PHP? If so, how?

3. Is there a way to view all files in a directory then let a user delete certain ones?

THANK YOU IN ADVANCE
Reply With Quote
  #2 (permalink)  
Old 09-23-04, 04:42 PM
Eclipse's Avatar
Eclipse Eclipse is offline
Coding Addict
 
Join Date: May 2004
Location: Long Island, New York
Posts: 356
Thanks: 0
Thanked 0 Times in 0 Posts
1.) I have no idea

2.) Try using mkdir() http://us4.php.net/mkdir like mkdir("www/new_folder",0777)

3.) Try using readdir() http://us2.php.net/readdir
Reply With Quote
  #3 (permalink)  
Old 09-23-04, 05:28 PM
rjwebgraphix rjwebgraphix is offline
Newbie Coder
 
Join Date: Sep 2004
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Spreegem
1. How would I attach a file to an e-mail using PHP? I already have my e-mail script made, and I can do the HTML part of it for having the user choose the file, but I don't know how to do the PHP part of it to attach it to the e-mail. Any and all help is greatly appreciated.

2. Is there a way to create a new directory with PHP? If so, how?

3. Is there a way to view all files in a directory then let a user delete certain ones?

THANK YOU IN ADVANCE
1. It can be done. You may wish to check how someone else did it. I don't have the time to look through it right now, but I use a script that does what your looking for and found it at http://www.dtheatre.com/scripts/formmail

I'm looking to modify it some so that I get custom error messages, but not for a few weeks yet.

2. Dunno, Too new at it myself to tell ya.

3. Ummm, Yeah, what eclipse said, that sounds good to me. Seriously, I have no clue.
Reply With Quote
  #4 (permalink)  
Old 09-24-04, 12:05 AM
mikaelf mikaelf is offline
Wannabe Coder
 
Join Date: Jun 2004
Location: php[dot]net
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
hello spreegem,
you can check this one:
http://www.phpclasses.org/browse/package/9.html

for sending mime-type emails.
have fun!
__________________
Useful PHP links:
bugs.php.net - for reporting PHP bugs
pear.php.net - PHP extension and application repository
pecl.php.net - get non standard PHP modules, submit yours
www.phpclasses.org - PHP classes repository
Reply With Quote
  #5 (permalink)  
Old 09-24-04, 05:34 PM
Spreegem Spreegem is offline
Newbie Coder
 
Join Date: Jan 2004
Location: In front of my computer
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
OK, thanks. About question 2 and 3 again though . . . For question 2 how would I delete PHP files?

For question 3, I kinda just wanted to know the exact line or two of code in PHP I would need, because that big long script is well, long, and It's kind of hard for me to figure out code when I didn't write it. I'll try to figure it out, but it's sort of confusing.

I now have a fourth question . . . I used PHP to create a directory from the example given above. I set the permisions for the directory to be created to 0777, so that should make a directory with world read write and execute right? Because group and other can't write files to the directory that PHP created.
Reply With Quote
  #6 (permalink)  
Old 09-25-04, 11:00 PM
Spreegem Spreegem is offline
Newbie Coder
 
Join Date: Jan 2004
Location: In front of my computer
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Uhh, bump . . .
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
two questions regarding iframes davidklonski JavaScript 2 07-13-04 06:15 AM
2 questions from my side. [associations and rating] admin0 PHP 1 05-12-04 10:04 AM
2 questions 1-Webbased database access. 2-PDF data retrieval Mehre PHP 1 04-11-04 04:20 AM
two questions....deleting mysql values and adding array value through forms mlbpa2 PHP 16 03-18-04 09:41 PM
woof ruff (i'm new with a few questions) APuppyDog PHP 2 07-22-03 10:51 AM


All times are GMT -5. The time now is 04:31 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.