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!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I have a customer of mine who has their own web/mail server. Recently, all PHP Post based mail forms have stopped functioning. No error is reported outside of the page that the user is directed to in the event of a failure in script processing (see code below):
All submissions redirect to the sub_error.html page. This is happening on 3 different scripts on this server, so I am assuming that it is not a code issue. Any ideas?
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Notice: Undefined variable: headers in E:\domains\cp\sendmail.php on line 4
Notice: Undefined variable: message in E:\domains\cp\sendmail.php on line 12
I have similar scripts to this running on other servers which are working fine. Not sure why it isn't here. I checked and register_globals is turned on.
Where does $message appear from? Can we see the form. Even with regsiter_globals on you want to start using $_POST... I'm not kidding, relying upon register globals is a huge security risk.
Moving to windows server group. Thanks for the tip on the $_POST. I will make that change ASAP. I uploaded the script to another server and it works great, so there must be a problem with this particular server. Sorry to have posted in the wrong group, though the tip I came away with may have made it worth the mistake.