Ugh that code is horrible , I dont have time to help you rewrite it now.. maybe in the morning but.
1) getenv is dodgy use $_SERVER insted
2) why are you posting things which you can get from the sendemail.php page , REMOTE_ADDR , HTTP_USER_AGENT and HTTP_REFERER.
2) The use of global variables on the second page is blah... use $_POST['variable_name']
3) Even if your code fails it still sends the email.... so if global variables are turned off on your server (notice errors ftw
) then all those variables wont exist and they will all be empty so when you go to use them it will email blank variables
quote:
Originally posted by raceprouk
1. You don't need to prepend 'From: ' to the from address.
yes you do ... that field is "Extra headers" so hes adding the from header.
code:
bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]] )