To twart spammers - can we hardcode the recipient in the php file instead of including it in the html form as a hidden field? If so how - I'm sort of new to php.
To twart spammers - can we hardcode the recipient in the php file instead of including it in the html form as a hidden field? If so how - I'm sort of new to php.
Can we hardcode recipient?
A modified version of this script has that capability. It can be found here.
http://members.rogers.com/mail.4.donpro/
hardcoding recipients in the formmail script
I tried donpro's script and it didn't seem to work, it just redirected me to a page that said it was the php script but just showed a blank page and never sent the email. The same thing happened when I tried changing the original script, it showed the php file as a blank page and didn't send the email when I tried to put my email into the .php file rather than the form itself but it didn't work. I'm using php version 4.3. Any suggestions?
Can we hardcode recipient?
If you tried both scripts and they both failed, chances are that it's not the script. providing a URL to your form is a good first step. Also, when debugging, do not use the hidded redirect fields.
Can we hardcode recipient?
Sorry about that. My form is available at http://toxic.magnesium.net/~riley/contact.html. It's not finished yet, but it should work. The only form fields I defined were realname, email, and feedback for the textarea. In the modified version of the script, the only things I changed were refers and emails. I also commented out the emails_cc and emails_bcc arrays because I wasn't using either of them.
Can we hardcode recipient?
Does the server stil have PHP installed? It looks like it was up to 12-Aug-2003.
http://uptime.netcraft.com/up/graph/?host=toxic.magnesium.net
Can we hardcode recipient?
It does indeed have PHP installed. If you check the fourth through the sixth rows on the site you mentioned, you'll see that it has PHP.
Maybe I should have clarified: the original version of Andrew Riley's script does indeed work. It's when I try to use the modified version, or to modify it myself to try to get the email in the script rather than the form is when I run into problems.