PHP Question
- Started
- Last post
- 13 Responses
- radar
I have a basic PHP mail form which worked fine on my media temple account while building the site, but now I transfered it to the clients Dreamhost account and the email comes through blank with no info?
any idea?
- acescence0
is the dreamhost account running php as cgi? i think there's a difference with accessing POST variables when php is not running as an apache module, or i could be making all of this up.
- Nairn0
Got code?
Your script probably has some code in it to specify which domains it is allowed to receive mail requests from, otherwise it could be open to abuse.
Have a dig around, especially in any config files, for variable declarations which might need amending (they should be in the first quarter of any code you have).
- radar0
so could I use the get method as a fix?
- radar0
yeah sorry here is the code from my process.php file
- acescence0
use $_POST instead of $HTTP_POST_VARS
- radar0
thanks alot acescence - that worked!
- moth0
probably running a newer version of php - hence it's now $_POST.
You (seriously now) need to look at protecting that form though. It's easily exploited and people will use it to send out spam - and kevin will be blamed - not just because he's called Kevin.
- moth0
- radar0
thanks moth, although now it's been tested and uses my clients email address, haha
- Mick0
Oh that form looks so easy to inject ;)
- cosmo0
use $_POST instead of $HTTP_POST_VARS
acescence
(Mar 20 07, 12:29)
- maximillion_0
what moth means is that although you have set it to use your clients email address, someone, and its very easy to do, could submit code in the form thatwil send a different email to the one you have defined , to whoever they want.