email

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

email

Post by enemeth »

hi there , i have this code below, that works great, but i need it to also take the information and email it to an email address can someone help me in getting it to do that ?

Code: Select all

 
<center>
<font face="book antiqua" size="4">
<?php
$target_path = "uploads/";
 
/* 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>
 
any help would be appreciated, thanks

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

Re: email

Post by enemeth »

or, is it possible to have to actions in one form? when hitting the submit button, it does two actions ?
User avatar
The_Anomaly
Forum Contributor
Posts: 196
Joined: Fri Aug 08, 2008 4:56 pm
Location: Tirana, Albania

Re: email

Post by The_Anomaly »

enemeth wrote:or, is it possible to have to actions in one form? when hitting the submit button, it does two actions ?
I don't see why you'd want to do that. Just use mail( ) after you finish the PHP code you already have there. Why would you want to send the POST to two pages?
Post Reply