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!
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 ?
<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>
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?