billy nugz Posted November 28, 2006 Share Posted November 28, 2006 Cant figure out some errors im getting. Im real new to php so small words and lots of pictures are bestHere is my code:[code]<?php/******************************************************************************\*******************************************************************************//*******************************************************************************/// Necessary Variables:$TO = "[email protected]"; // En: E-Mail of mail recipient. // Fr: E-Mail pour l'envoie. $DEFAULT_EXIT_PAGE = "confirm.html"; // En: exit page. // Fr: page de sortie.// End Necessary Variables section/******************************************************************************/$headers = "From: CONTACT FORM $SERVER_NAME <$mail>\n";$headers .= "FORM MADE BY billy nugz/\n";$message = "";while (list($key, $val) = each($HTTP_POST_VARS)) { $message .= "$key : $val\n"; } $message .= "\nSent by ".gethostbyaddr($REMOTE_ADDR). " ($REMOTE_ADDR)\n";mail($TO, $subject, $message, $headers); // En : Send mail // Fr : Envoi du mail if(! $exit_page) $exit_page = $DEFAULT_EXIT_PAGE;Header("Location: ".$exit_page); // Exit -> $exit_page?>[/code]Here is the error:[code]Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /var/www/www.chartright.com/test/form/form2mail.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /var/www/www.chartright.com/test/form/form2mail.php:28) in /var/www/www.chartright.com/test/form/form2mail.php on line 37; Header("Location: ".$exit_page); // Exit -> $exit_page ?> [/code]I spoke with a tec and he said it was my code, but this is a bit beond my skill set. Any help would be great Quote Link to comment https://forums.phpfreaks.com/topic/28781-php-mailer/ Share on other sites More sharing options...
billy nugz Posted November 29, 2006 Author Share Posted November 29, 2006 BUMP ???? ??? :-[ Quote Link to comment https://forums.phpfreaks.com/topic/28781-php-mailer/#findComment-132118 Share on other sites More sharing options...
wildteen88 Posted November 29, 2006 Share Posted November 29, 2006 Well the header already sent error message is probably caused by the first error. So if you fix the first error then all should be fine.See if changing $REMOTE_ADDR to $_SERVER['REMOTE_ADDR'] sorts it out. Quote Link to comment https://forums.phpfreaks.com/topic/28781-php-mailer/#findComment-132253 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.