PHP attachment

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
enemeth
Forum Commoner
Posts: 66
Joined: Tue Mar 27, 2007 8:55 am

PHP attachment

Post by enemeth »

Hi there,

I have this code that allows my employees to upload resumes into an uploads file on my server, and then everyone can see these resumes who has access to the page, it emails me confirmation that there was a file uploaded, but i need it to also along with uploading it to the specific folder on my server to email the resume as an attachment , i hope someone can help me on this, i have been trying for days moving code around to get it to do it but to no avail, can someone take a look and help me out ??? ;)

Code: Select all

 
<center>
<font face="book antiqua" size="4">
<?php
$target_path = "uploads/";
$path = "A new resume was posted to Accounting under Audit ";
$to = "email@home.com";
$subject = "Resume Added to Database";
$txt = $path;
mail($to,$subject,$txt);
/* Add the original filename to our target path.  
Result is "uploads/filename.extension" */
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']); 
 
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
    echo "The file ".  basename( $_FILES['uploadedfile']['name']). 
    " has been uploaded";
} else{
    echo "There was an error uploading the file, please try again!";
}
?>
<script>
var redirecturl="acca.php"
var pausefor=1
 
 
function postaction(){
if (window.timer){
clearInterval(timer)
clearInterval(timer_2)
}
window.location=redirecturl
}
setTimeout("postaction()",pausefor*1000)
 
</script>
 
</font>
 
thank you for any kinda help :) much appreciated ;)

Elaine
youropensource
Forum Commoner
Posts: 26
Joined: Tue Aug 05, 2008 11:42 am

Re: PHP attachment

Post by youropensource »

For Email attachment with resume, check the following URL to get it :)
enemeth
Forum Commoner
Posts: 66
Joined: Tue Mar 27, 2007 8:55 am

Re: PHP attachment

Post by enemeth »

it didnt work! :(
Post Reply