Page 1 of 1

email

Posted: Wed Oct 01, 2008 6:22 pm
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

Re: email

Posted: Wed Oct 01, 2008 8:57 pm
by enemeth
or, is it possible to have to actions in one form? when hitting the submit button, it does two actions ?

Re: email

Posted: Thu Oct 02, 2008 12:49 am
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?