mail script sends mail when testing locally but not live
hi,
When i was testing my site, the send mail code was working fine, now I have uploaded it to my live server, I'm not recieving any email and there are no errors?!
here is the code:
PHP Code:
$body = 'Someone with the email: '.$emailaddress.' voted for: '.$opt[$z];
Does it say the message is sent? If so, the mail is queued and this is an issue with your smtp server, not a PHP one.
If it said it failed, than you likely haven't configured the smtp options in the php.ini. Either configure them there, or provide the configuration options as the fifth argument in the mail call.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Then you can take a dive into the sendmail logs on the machine. This isn't directly a PHP issue, so you'll need to find out what's wrong with the sendmail.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value.