|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
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) |
|
||||
|
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. |
|
||||
|
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) |
|
||||
|
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 |
|
||||
|
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) |
|
|||
|
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 |
|
||||
|
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) |
|
||||
|
This is a pretty nice one, easy to implement too.
http://www.stadtaus.com/en/php_scripts/formmail_script/
__________________
http://www.wis-tech.net |
|
||||
|
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) |
|
||||
|
:-)
__________________
http://www.wis-tech.net |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |