 |

05-10-2007, 06:52 AM
|
 |
WebProWorld Veteran
|
|
Join Date: Jul 2004
Location: On the edge of the UK
Posts: 448
|
|
Response emails are blank
I am using Jack's formmail.php for the first time on a site in development. I have configured the php as directed (recipient, referers etc.) and put it in the cgi-bin (711 bin, 755 script). The xhtml (suffix .php) form (method="post") is also configured correctly and validates. The form handler works, an email is sent as does the redirect to a thanks page. The resulting emails contain the user's IP (REMOTE ADDR) as requested by a hidden field (env_report) but all other required data is missing. I get no php error messages and the error log is clean.
Has anyone else experienced this and can you please suggest what I have done wrong?
__________________
Pleasure in the job puts perfection in the work. Aristotle (384-322 BC)
|

05-10-2007, 08:06 AM
|
 |
WebProWorld Veteran
|
|
Join Date: Jul 2004
Location: On the edge of the UK
Posts: 448
|
|
One other bit of info that might be relevant is that when I view the email headers in Mailwasher and until I click the header in Thunderbird, there is an attachment icon but nothing is attached.
__________________
Pleasure in the job puts perfection in the work. Aristotle (384-322 BC)
|

05-10-2007, 09:25 AM
|
 |
WebProWorld Veteran
|
|
Join Date: Sep 2005
Location: Kerala, India
Posts: 397
|
|
Try this, might work. In the PHP code that processes the info sent by the form, add the lines:
Code:
$name = $_POST['name'];
$email = $_POST['email'];
etc.
immediately below the opening <?php Start Tag for each field in the form.
|

05-10-2007, 02:28 PM
|
 |
WebProWorld Veteran
|
|
Join Date: Jul 2004
Location: On the edge of the UK
Posts: 448
|
|
Thanks Sands but unfortunately it didn't change a thing. Also, there is no <?php start just <? in the original but adding it made no difference.
__________________
Pleasure in the job puts perfection in the work. Aristotle (384-322 BC)
|

05-10-2007, 03:21 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Oct 2003
Location: Encinitas, CA
Posts: 1,908
|
|
I'm not familiar with that particular script, but it seems to me that a PHP script does not need to be part of the cgi-bin. I think you may be confusing a cgi script with the PHP. Most run from root.
Anyway, if you are receiving a blank email, you simply haven't added the message to be included as the part of the email and/or the variable for the message has not been set.
__________________
DrTandem's San Diego Web Page Design, drtandem.com
|

05-10-2007, 03:45 PM
|
 |
WebProWorld Veteran
|
|
Join Date: Jul 2004
Location: On the edge of the UK
Posts: 448
|
|
Thanks Dr, I put the script in the cgi-bin because I believe it is safer there than in the root. I often put vulnerable scripts there for the same reason. I have tried running it from several locations but it makes no difference to the results.
You can view the original script by clicking the link to it in my opening post. The only variable I haven't configured starts on line 144 function parse_form($array, $sort = ""), frankly I don't understand it and as according to the documentation the default sort order is the same as the structure of the form (1,2,3...) and I don't need to build a reserved keyword array.
I'm quite sure I have missed something simply vital and when I understand will feel foolish! Hey ho!
__________________
Pleasure in the job puts perfection in the work. Aristotle (384-322 BC)
|

05-10-2007, 04:41 PM
|
|
WebProWorld New Member
|
|
Join Date: Feb 2005
Posts: 11
|
|
Hi Tim,
I've used the script a lot in the past and not had any problems but it is a very old script and it could be that your host's php settings are too modern for the script to work.
Another thing I would try is to change the line:
$content = parse_form($HTTP_POST_VARS, $sort);
to:
$content = parse_form($_POST, $sort);
Gabriel
|

05-11-2007, 03:49 AM
|
 |
WebProWorld Veteran
|
|
Join Date: Jul 2004
Location: On the edge of the UK
Posts: 448
|
|
Thanks Gabriel...that fixed it!
Can you recommend a newer and better php form handler? I intend to add either a hidden field which must be left blank or a php 'captcha', to filter out the spam bots, so one that already contains either would be wonderful.
Thanks again, it was driving me nuts.
__________________
Pleasure in the job puts perfection in the work. Aristotle (384-322 BC)
|

05-14-2007, 03:38 PM
|
 |
Moderator
|
|
Join Date: Jul 2006
Posts: 89
|
|
|

05-14-2007, 03:44 PM
|
 |
WebProWorld Veteran
|
|
Join Date: Jul 2004
Location: On the edge of the UK
Posts: 448
|
|
Thanks Vectorman211,
I had already downloaded that script but haven't got round to checking it out yet. Your recommendation will ensure I do! Much appreciated... thanks
__________________
Pleasure in the job puts perfection in the work. Aristotle (384-322 BC)
|

05-14-2007, 03:56 PM
|
 |
Moderator
|
|
Join Date: Jul 2006
Posts: 89
|
|
:-)
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|