Hello, On 08/30/2002 04:46 AM, Mark Colvin wrote: > The script below works on my development web server which sits on our > company LAN. When I transfer the script to our isp hosted webserver, the > script does not work. I changed 192.168.10.9/iarnaweb/ to read localhost/ > for the isp webserver version (I have also tried replacing localhost with > the actual ip address). On my development server, the email is sent and the > redirection happens but on the production server neither of these happens. > Any ideas? > > <?PHP > $toaddress = "[EMAIL PROTECTED]"; > $subject = "Enquiry via Web Site."; > $mailcontent = "Customer Name: ".$name."\n" > ."Position: ".$position."\n" > ."Company Name: ".$company."\n" > ."Address: ".$address."\n" > ."E-mail: ".$email."\n" > ."Tel No: ".$telno."\n" > ."Customer Comments: ".$enquiry."\n"; > > mail($toaddress, $subject, $mailcontent); > > header("Location: http://192.168.10.9/iarnaweb/contactack.html"); > > ?>
The mail function mail fail for many reasons but you are not checking its return value. Possibly it is just PHP configuration issue on your server. Which platform do you use? Another point is that the Location: header is meant to be interpreted by the user browser, not your server. So, it should include the real server domain because localhost for each user is their own machine, not your server. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php