New Contact Form Support Post

Posted February 21st, 2009 by Mike Cherim

Form Support: If you need support for my version 2.0, 2.0WP, or GBCF-v3 contact form scripts, this is the place to get it. The new place. I’ve used the same blog posts for contact form support comments and questions for such a long time, their pages have gotten long. Really long! I decided to start a new one and just close those. That said, those old posts have not stopped living their useful lives. Many of your questions may already be answered there, read them first.

Support Update: New contact form plugin version 2.1 (for WordPress v3.0+) is now available and better than ever thanks to Mike Jolley. Sorry to those inconvenienced by the wait for a revised edition. This will be worth the wait, though.

Please check out these old support posts first:

Before you post, here’s some important info:

  • Please identify which script you’re seeking support for. Include the build number as well. If WordPress-related, please be sure to include your WP version as well.
  • Comments to this post are only for support of the aforementioned form scripts. Not for other people’s form scripts. If you need help with theirs, ask them.
  • I won’t offer much help in the way of styling or customization support. This post is mostly for installation and configuration help, and for your comments and/or suggestions.
  • If you need to post code, please wrap your code in <code></code> tags, and be sure to convert less-than and greater-than symbols as follows: If you want < write &lt; and if you want > write &gt; — if you don’t do this, your code won’t post.

Okay, ’nuff said… what’s on your mind?

NOTE: Nov. 2011: Please read update.

333 Responses to: “New Contact Form Support Post”

  1. Gill responds:
    Posted: February 24th, 2009 at 7:35 am

    Before all the questions start hitting the page I wanted to say the form is an absolute Godsend Mike. I use it on a number of sites and it’s slick and spam free. You’re my Hero! :)

  2. Alex responds:
    Posted: February 27th, 2009 at 1:27 pm

    Hi Mike,

    Absolutely fantastic form. Really easy to use, implement and customise. A Godsend as the previous poster says!

    I do have a question though - I’ve set the form up as instructed but for some reason the email message gets sent to the inputted email address all the time and not to the intended address.

    It would be like this message getting emailed to the address I’ve put in rather than posted here. Any ideas?



  3. Alex responds:
    Posted: March 2nd, 2009 at 12:03 pm

    Hi Mike,

    Have a look at - the testing site I’m using. Whatever address you fill in in the email field the message will be sent to - not the address in the config file.

    I’m using the latest version.



  4. Olga responds:
    Posted: March 10th, 2009 at 12:46 am


    I am trying to use your contact form, but my web host doesn’t allow me to upload any language files. It says that these fyle types are not supported. Does it mean I can’t use your program at all? I am trying to use ver3.

    Thank you

  5. Jose Gonzalez responds:
    Posted: March 10th, 2009 at 6:32 am

    Hi Mike and everybody else,

    I’m using Version 2 for WP and I just have 2 questions:

    1. To enter 2 e-mail addresses in the forms config, do I separate the e-mails with a comma or a semi-colon? Spaces needed? I couldn’t find this in the documentation.

    2. When I submit something via the form, the output screen reads:

    Results: Success! Mail Sent!
    Message Sent: You have successfully sent a message to me, Jose Gonzalez…

    I’d like to change the name as the form is on somebody else’s website. I’m the only registered user (admin) as the owner does not log in at all. Where can I change the name?

    Many thanks for your time and well done for the best form out there… BY FAR!!!


  6. Jose Gonzalez responds:
    Posted: March 10th, 2009 at 7:57 am

    Hi Mike,

    I see - the form is talking to the sender… (duh… my bad).

    Mike: thanks for the quick response!

  7. Olga responds:
    Posted: March 11th, 2009 at 11:54 am

    Thanks so much Mike! You were right on target. Ftp has worked perfectly!

    Appreciate it! :)

  8. Bill responds:
    Posted: March 11th, 2009 at 11:39 pm

    Thanks for creating and sharing this.

    Please check out my validation page noted above.

    The only reason you can see this is becuase I changes this (in function.php) [Code removed to save space] to this [Code removed to save space]

    None of the variables show up. I beleive that all I need to do is go through each file and set it up with the correct number of “../” directory indicators? True?

    Is there an easier way of doing this?

  9. Bill responds:
    Posted: March 12th, 2009 at 8:29 am

    Thanks for the reply.

    The only change that I made is noted in the previous post. I just uploaded the unedited version. Please take a look and let me know what you suggest.

    Thank you.

  10. Bill responds:
    Posted: March 12th, 2009 at 10:44 am

    Thanks for reply.

    OK, I contacted support and they told me that the server this is hosted on has an older version of PHP. They are going to upgrade the account to a new server with the newest version of PHP.

    I’ve installed this on my domain and my churches domain without any problems so this was puzzling to me as well. Now we know.

    Thanks & Be Blessed!

  11. Gustaf responds:
    Posted: March 21st, 2009 at 2:49 pm


    Great script, I just had a question - is there any way to make an attachment of a file before sending the form?


  12. ANANDRAJ G responds:
    Posted: March 22nd, 2009 at 12:41 am

    Hi Mike,

    Absolutely it is really fantastic one. Really easy to use, implement and customise. A Godsend as the previous poster says!

    It is reallt great to see such Blogs with good contents. I am eager to have more from u.


  13. Anmari responds:
    Posted: March 23rd, 2009 at 2:53 am

    Wonderful form - thank you
    However, It is not listing the themes in the styling page.
    I have not “fiddled” or edited, have simply loaded.

    I do have my wp-content folder separate from my wordpress folder - see editing wp-config.php or “giving wordpress it’s own directory” at - perhaps that is causing the problem, you may need to change the location called in the plugin.

  14. Anmari responds:
    Posted: March 23rd, 2009 at 4:54 am

    Me again - I think you need to use WP_PLUGIN_URL or WP_PLUGIN_DIR, instead of assuming that the wp-content folder is where it normally is. See

    It looks like the following Lines may be affected :
    line 58 and 60
    line 173
    line 213
    line 279
    line 301
    line 377

  15. Anmari responds:
    Posted: March 23rd, 2009 at 5:24 am

    Okay - I have fixed the code and it seems to be happy now (except it does not like the default permalinks “?page_id=99″, but just gives warning, still works okay .

    If you’d like me to send the code with the plugin_url and plugin_dir, please email me.

    Thanks for a great job!

  16. Marcel responds:
    Posted: March 25th, 2009 at 11:37 am

    Hi Mike, I’ve installed your nice contact form. test-form.php works, validate.php is all green, but I get a weird form. Screenshot:

    Can you help me pint in the right direction? It looks like all the used variables are empty…

  17. Marcel responds:
    Posted: March 25th, 2009 at 12:59 pm

    Whoops, delete that previous comment ;-)

    The tree:

    / < -- document root

    I don’t understand why the test-form works, and including it in my page doesn’t.

  18. Paul responds:
    Posted: March 29th, 2009 at 2:41 pm

    Hello Mike, great script, exactly what I was looking for, however I’m having a problem. I’m using GBCF-v3 on GoDaddy Linux PHP5.x enabled account. I get through steps 1-8 with no problems. The validation and form-test files are working as I expect with no issues. Step 9 however is where things go wrong. I created a contact page, followed step 9, but when I view the page, it’s blank. I put the validation and form-test files in the same directory as the contact form and again, exactly as I expect with no issues. There are no entries in my error log. I “feel” like I’ve followed step 9 correctly, but I’m relatively new to this. I used notepad to edit the config file, filezilla to ftp to server and Dreamweaver to update my HTML. I suspect something with the HTML, but can’t seem to pinpoint why it’s not working. Any ideas or suggestions?


  19. Dee responds:
    Posted: March 30th, 2009 at 1:23 am

    I love this script!!!! Thank you so much!!!! I have one issue. I’m getting more than one copy of an email. I have this script in its own folder in more than one location, and am only having an issue with one of the locations. How do I fix this?
    Thanks Mike :)

  20. Paul responds:
    Posted: March 30th, 2009 at 12:13 pm

    Thanks Mike. I didn’t mention it, but I had tried .php per the FAQs and that didn’t work either. I also tried adding an .htaccess file per other comments/problems.

    The solution was twofold: You can’t put fully qualified URL in php include statement, this doesn’t work: , this does: Second, as others have said, Go Daddy sucks. I had to add .htaccess file to enable .php within .html. Once I figured out the URL problem, I went back to the .htaccess solution and it worked.

  21. Kevin responds:
    Posted: March 31st, 2009 at 8:57 am

    Hello Mike,

    I am using GBCF-v3 on a static site. Form Version: v3 - Build Number: B3.20090130.01 - Model Number: SASU

    My validation file:

    For the options array, I want end users to be able to select more than one item by holding down the Ctrl key.

    I have it half-working. In form.php I changed id= to multiple id= and that shows all of my options and allows the user to select more than one. However, only one of the options is sent in the email.

    You can see the live form here:

    I appreciate your help.


  22. Kevin responds:
    Posted: March 31st, 2009 at 9:43 am

    Yeah, checkboxes allow a multiple selection. Radio buttons are typically for choosing just one option.

  23. Paul responds:
    Posted: April 1st, 2009 at 3:05 pm

    Hi Mike,

    Thanks very much for this contact form! However I am having some problems. I get a success when using the contact form but no mails are sent. I looked in my server error log and i get the following error messages: (ip address edited, plus the domain name)

    [Wed Apr 01 19:43:49 2009] [error] [client] PHP Warning: mail() [<a href='function.mail' rel="nofollow">function.mail</a>]: SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE. in /var/www/vhosts/ on line 1145, referer: [...]

    Have you any ideas how i can fix this?

    Best Regards

  24. Jeremy responds:
    Posted: April 2nd, 2009 at 3:23 am

    Thanks! This is a grrreatt and easy to use contact form for our wordpress site. It was so easy to set up and no fuss. Awesome!!!

  25. Paul responds:
    Posted: April 2nd, 2009 at 12:21 pm


    I turned off safe mode and it is now working, thanks.

    Have other users managed to use the contact form with safe_mode enabled? I did some googling and it appears that by default the mail() function will not work with safe_mode switched on.


  26. Bill responds:
    Posted: April 6th, 2009 at 5:02 pm

    I would like the font face, size and color to be the same as what’s on my website. I though I read about somewhere in your documentation but can’t find it. Is there an easy way to do it.

  27. Bill responds:
    Posted: April 9th, 2009 at 10:01 am

    Thanks for the reply.

    I assume that it uses the default.css but when I make changes it makes no difference.

  28. Bill responds:
    Posted: April 9th, 2009 at 11:36 am

    Thanks for the reply. Sorry I didn’t include the version. It’s GBCF-v3. You can see what I get at the link included.

    I know enough css and php to be dangerous. I am a quick study and can figure things out pretty quickly but this has me stumped. I know I must be missing something. It’s a fresh install of the script and the only changes I made were to the config file, as suggested. I don’t see any references to the .css files in anywhere and I haven’t added them. I’ve used this script on a couple other websites and in each instance it adopted the formatting from my existing style sheets.

    Now one thing I noticed, is the way that the style sheet is referenced in my html.

    @import "style.css";

    Typicaly I will use this reference:

    I don’t know what difference this makes but in the site that I refernce it the second way it works fine.

    Let me know what you think.

  29. Bill responds:
    Posted: April 9th, 2009 at 11:40 am

    Sorry forgot to enter the code correctly. Here it is.

    <style type="text/css">
    @import "style.css";

    <link href="style.css" rel="stylesheet" type="text/css" />

  30. Marc responds:
    Posted: April 10th, 2009 at 9:58 am

    I was just wondering if I can create some options such as: a array of lets say departments which gives way to the e-mail addresses for that department with the “select all” option or individual e-mail address.

  31. Vladimir responds:
    Posted: April 11th, 2009 at 3:21 pm

    Hi Mike,
    Thank you for excellent script which works almost out-of-the-box. Just to advise I am non-technical person in terms of general and more in-depth knowledge of PHP language so a bit of patience is appreciated. May I ask you if this is possible:
    1) 1st question. To ensure some fields can be filled with certain characters only ? Let us say I want one field to have URL address only (OK, that is basically no restrictions then) and the other have no URLs or HREF tags etc i.e. number, digits and probably dots. One form I tried has validation option but it can be easily disabled by client if he uses Opera browser and hit “disable script running on this page” and thus form gets emailed unvalidated
    2) 2nd question. To restrict amount of characters for each field.

    I have figured out the rest of what I need from help so 2 questions only :)
    P.S. I checked posts and could not find similar questions. And if possible please respond in plain English as I am not a technical person and just try to make sure my very simple form of 5 fields to get validated before it’s output is emailed to me.

    Appreciated and thank you.

  32. Vladimir responds:
    Posted: April 11th, 2009 at 7:14 pm

    Thank you Mike,
    So in summary:
    1. The HTML code gets stripped. OK.
    2. I am using version 3 and you say you do not plan to do any “URL” filtering. OK.
    3. I have checked the documentation and under “Advanced settings” I see ability to limit number of characters per field (good). This addresses half of my question #2 in previous post.
    4. My main question now is how to restrict let us say field “Address” to “letters, numbers and comma” characters only as these are the only valid ones to use there. Similarly ( a bit different validation method though) “email” field should have at least “@” and “.” as the bare minimum. So some kind of restriction and/or validation methods.

    Thank you


  33. Vladimir responds:
    Posted: April 14th, 2009 at 3:05 pm

    Ok, thanks Mike.
    After reviewing your answers and digging through config and language files I somehow managed to remove unnessessary fields and fit the script to my needs.

    Now the last issue is I have renamed “message” field (at the very bottom) to another mandatory name and wonder how I can limit amount of characters for this specific field. OK, no cumbersome or re-architecturing questions I guess I have asked previously (though they looked common sense requests to me), just limit number of characters in “message” field to let us say “150″

    Any idea or specific section to change ? Thank you.


  34. Vladimir responds:
    Posted: April 14th, 2009 at 9:56 pm

    Thank you Mike,
    I have managed to limit the field (edited scripts) and form is working almost as I wanted to.

    Thank you so much for patience and help Mike.
    P.S. I have a few small issues …cannot resize one field (make it taller and wider) but that is more cosmetic, will handle it or leave it as-is.

    Best regards,

  35. George Park responds:
    Posted: April 17th, 2009 at 9:33 am

    Hi Mike,

    I am using GBCF-v3 and was wondering if it is at all possible to make a field in the optional area a required field.

    I am experiencing problems with not being able to reply to emails due to spam blocking and have had problems especially with Hotmail and of course have no other way of contacting the prospective client.



  36. George Park responds:
    Posted: April 17th, 2009 at 1:07 pm

    Thanks for the reply, but with my knowledge I wouldn’t even know where to start.

  37. George Park responds:
    Posted: April 17th, 2009 at 1:28 pm

    I will, thanks for the link.

  38. Stan Rachwal responds:
    Posted: April 22nd, 2009 at 4:04 am

    I just downloaded version 3 of your program which was something been looking for for a while. I tried running your program on my local computer and got an error message that functions PHP could not be first question is do I have to have this program on a host server or can I run it locally. As my website is currently not live it would be hard for me to put it on a host server.I know a little bit about CSS and html but I know nothing about PHP. So any help that you can provide would be greatly appreciated.

    best regards,

  39. Stan Rachwal responds:
    Posted: April 22nd, 2009 at 4:10 pm

    hi Mike,
    after spending a few hours on the script, I finally got it work.there are two fields that I would like to get rid of. The first is the country and the second would be the optional text.I also need to have all fields required. Can you tell me how I can go about accomplishing this?

    PS. Since I travel quite a bit between Pennsylvania and Maine with my photography, maybe we will meet up one day.

    best regards,

  40. Stan Rachwal responds:
    Posted: April 24th, 2009 at 5:17 pm

    hi Mike,
    here is my dilemma. I’ve been able to get your test form to work on my site. It returns an e-mail with all the particulars, but when I enter all the information into my contact form, I hit a snag. I fill in all the fields and click submit nothing happens.I know nothing about PHP and would appreciate any help that you can give me. My contact page.


  41. Stan Rachwal responds:
    Posted: April 25th, 2009 at 3:07 am

    I know I’m being a pest but can you answer one question for me. My script works when action = test-form.php#results, as soon as I replace test-form.php with contact_info.php#results the script stops working. this is the error that I get on a blank page.
    Method Not Allowed
    The requested method GET is not allowed for the URL /980/contact_info.html.

    There are no errors in the error logs.

  42. Stan Rachwal responds:
    Posted: April 25th, 2009 at 12:49 pm

    I did not change the script. I just replaced test-form.php#results to contact_info.php#results

  43. Stan Rachwal responds:
    Posted: April 25th, 2009 at 1:00 pm

    I just tried it again. error log contained this error: [25-Apr-2009 12:12:39] PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/timel13/public_html/980/gbcf-v3/files/CONFIG.php on line 48
    Again I did not change anything in the “$subjects = array(” area.

  44. Stan Rachwal responds:
    Posted: April 25th, 2009 at 6:46 pm

    Can you check out this error. All the files are where there supposed to be.
    contact page
    All files where just downloaded. only file that was changed was config.php. Validation works as does test-form.php.

    The include line gives me this error regardless where I put it in the .

  45. Mateo responds:
    Posted: May 3rd, 2009 at 2:28 am

    Hey - I am a huge fan of your plugin and script. However, I am using it within wordpress 2.7.1 (gbcf v3) with a few of the php tweaks to get it to run. When I have permalinks enabled (/%categories%/%postname%) and go to the page, it gives me a 404. However, if I preview it or view it through the normal permalinks (?p=nnn) it works fine. Any suggestions to get it working with the former permalinks? Thanks for any suggestions.

  46. Erik Arckens responds:
    Posted: May 12th, 2009 at 9:15 am

    Hi Mike,

    this is the best thing since sliced bread!!!

    Only issue I have: when I reduce the size of the frames, the footer elements (blocked ip and author name) shift all the way to the left, out of the box. Only solution I found was not to display those. If you have a solution, I will make sure your name comes up on my form box.

    Thanks for your GREAT work!

  47. Erik Arckens responds:
    Posted: May 12th, 2009 at 9:24 am

    And another question:
    I would like to add another optional menu (selection of hours where the sender can be contacted).
    Is this something you might consider in the near future for a new version? Or should I do this myself?
    If so, how do I best go about?


  48. Erik Arckens responds:
    Posted: May 18th, 2009 at 7:59 am

    Hi Mike,
    adding another optional menu indeed will require hours of intensive work; I know very little of php but I figured that one out already. Yes, this is about V3. I did a shortcut on this work by changing one of the optional menus to what I want it to be.
    Maybe in a future release you would want to consider this extra? (hint hint)
    For the rest, only Major praise!!

  49. ThecounT responds:
    Posted: May 21st, 2009 at 1:21 pm

    HI MIKE, I love your plug in and use it on my site above any other like it. Having said that, I have an issue with it since moving server/ hosts. I now get this error:

    Fatal error: Cannot access empty property in /data/user/1633576/htdocs/thecount/wp-includes/functions.php on line 452

    I’ve look aroud and read a lot about this, I do not share any of the plugins that might cause this, can you please help, I want to contuine to use your plugi.


  50. ThecounT responds:
    Posted: May 21st, 2009 at 11:58 pm

    that did not work. do I have any more options? :D

  51. Derek responds:
    Posted: June 9th, 2009 at 1:41 am

    Hey Mike! This is great code. It was referred to me by a friend who uses it on all the websites he develops. The install was quick and easy, and everything validated fine and tests out nicely.

    So now, here’s my problem, and this may bo so simple that it’s crazy, but:

    I want to include this form within an HTML page I’ve already developed, and I want to use only certain fields from your default test form (such as Name, E-Mail, Phone, Website, and Comments). How do I go about this? Is what I am asking for even possible?

    Thanks for any help you can give. :D

  52. Derek responds:
    Posted: June 10th, 2009 at 5:09 am

    Sorry, Mike - you lost me. Yes, I am using v3. I looked at the CONFIG.php file and didn’t find anything that would answer my question. What am I missing here? Am I so brain dead that the answer is painfully simple and I’m glossing right over it? Please point me in the right direction. :D

  53. Amber responds:
    Posted: June 18th, 2009 at 10:53 am

    Hi Mike,
    This form is awesome! Thank you so much for sharing it with us all, I’ve been pulling my hair out trying to create a form with such robust verification. I will try to make a donation soon. I’ve done a bunch of customization to take fields out and change required fields, and the ONE thing that is stumping me is getting the form to send to multiple recipients. I saw above that Jose had asked the same question and you said that adding a comma and space between email addresses should do it, but I can’t get that to work.

    Here are the details:
    Using v3
    In the Config.php file adjusting:
    $send_email = "info @, myname @" ; // Your email

    Can you see anything that I am doing blatently wrong here? I’ve tried numerous variations and I either break the form, or it only sends to the first email address I put down. Do you have any thoughts on this? I would be so thankful!!

  54. Amber responds:
    Posted: June 18th, 2009 at 12:13 pm

    Mike, thanks for the very fast reply. I did try removing the space with no luck. I’ll try adding the second mail function as you suggest. Maybe I can get that to work. Thank you very much for your thoughts on this!!!

  55. Amber responds:
    Posted: June 18th, 2009 at 12:55 pm

    Just FYI, I did get it to work. It may be the incredibly “hackish” way to do it, but for anyone else who needs it, I added a second $send_email in the config.php file as:
    $send_email2 = ""; // Your email

    and in the functions.php file I added a second mail function at line 1137:
    mail("$send_email2", "[$web_site] $subject_value",$mail_content,$mail_header,$param);

    Three emails were sent (including the cc email), so it seems to get the job done!

    Thanks again for your suggestion.

  56. Amber responds:
    Posted: June 18th, 2009 at 1:54 pm

    Thanks for the tip. I will use the clean_var() function immediately!

  57. George Park responds:
    Posted: June 18th, 2009 at 5:27 pm

    I have recently upgraded to WP2.8 and since then, my contact page does not work. You can see the page in my url above.

    I have uploaded the files, after deleting them of the server, re-activated the plugin, checked all the settings and made sure that the code is in the page and still no fields for the Contact Page.

    Any suggestions?



  58. George Park responds:
    Posted: June 19th, 2009 at 4:46 am

    There are no PHP errors being recorded and it is a Page and not a Post.
    Been using the form for about a year and it worked great, but since the upgrade from 2.7 to 2.8 the problem has arisen.

  59. George Park responds:
    Posted: June 19th, 2009 at 4:11 pm

    Hopefully Mike will be able to throw some light on this.

  60. George Park responds:
    Posted: June 20th, 2009 at 1:08 pm

    If it helps, I can let you have my admin log in for my blog.
    Let me know and I will email it to you.

  61. Mike Jolley responds:
    Posted: June 21st, 2009 at 9:38 am

    Hi George, Ill gladly take a look for you if you email me at

    Out of interest though, does the page completely stop loading from where the contact form should appear (for instance the footer may be blank or similar). If it does then this may help Just a thought.

  62. Mark responds:
    Posted: June 22nd, 2009 at 8:19 am

    Hi I love this contact form it works great there is one small thing that happens and I wonder if you have come across it. I notice that sometimes when people send me a mail it some times cuts them off up to a certain point as if it’s limiting the amount of characters you can have.

  63. Mike Jolley responds:
    Posted: June 23rd, 2009 at 5:42 pm

    @George Park and others with same problem, if your using the ’share on facebook’ plugin the form will not show; I believe it’s the other plugins fault, not GBCF’s.

  64. steve responds:
    Posted: June 24th, 2009 at 12:56 pm

    I got the TESTpage to run but after that I’m officially stuck.

    steps 8 and 9 I’m completely puzzled.

    if this is my “contact page” html

    Fields marked (*) are required

    Email From:*

    Full Name:*


    someone please tell me where to put these lines of code??

    9. Add the link to the style sheet and the focus JavaScript file - for form field
    focus effects for Internet Explorer - to the head of your contact form page
    (see Figure 1), then add the PHP “include” to the body content area of that
    same page (see Figure 2). Go live and worry not.

    Figure 1 Note: You may choose to add the form styles to your own style sheet or
    do something else such as use existing styles. It’s your call. Use the default
    style sheet to see what classes you have available to you. The style sheet name
    in the example is default.css. Change as needed if using a theme.

    P.S. the location of the files is in my root folder

    thanks for the replies.. Im definately looking forward to using this script.

  65. steve responds:
    Posted: June 26th, 2009 at 1:37 pm

    I looked all over the documentation and the stylesheet and config file and I have no idea where to change the
    font, font size and and the font size when the user types in

    my goal is to be able to have all the fields appear small enough so that it fits on one page without scrolling.

    Mike, please tell me EXACTLY in the stylesheet these options are: :) great script man and thanks for being so patient!!!

  66. Steve Anderson responds:
    Posted: June 29th, 2009 at 9:30 pm

    Hi Mike,

    Your form is awesome, I’ve recommended it to heaps of people. Recently I had a lady try to install it through WP 2.8 as a zipped file but it threw up an error saying there was no header or something like that. I figured I would just get her to unzip the file on her desktop and upload it through her FTP client but for some reason when she extracted it all the files came out separately (ie, not in a folder). I tried this on my PC with the same result…strange. I ended up just downloading the folder from a website of mine and uploading it to hers and that worked but as I recommend your plugin a lot I was wondering why this is happening and is there a way around it.



  67. steve responds:
    Posted: July 6th, 2009 at 1:31 pm

    on the contact form…

    I figured out to change the text size on the drop down menus, but I want the MAIN headers to change size


    where in the stylesheet do I do this?


  68. steve responds:
    Posted: July 6th, 2009 at 1:51 pm

    OK- nevermind figured it out

    now I’d like to have the fields horizontal instead of all vertical…

    like this

    Name Zip Code
    Email Country
    Organization Website
    Phone Address Referred By
    City/Town Subject
    State Message

    any ideas on how to do this???

  69. steve responds:
    Posted: July 6th, 2009 at 3:28 pm

    thanks Mike but I want just 2 columns

    Name-State on the Left
    the rest of the fields on the right

    i asked for some help on some forums and they told me to setup a div and float it right?

    you know the code to copy/paste into the stylesheet?

  70. steve responds:
    Posted: July 7th, 2009 at 11:41 am

    got everything working just how I wanted it with a little trial and error

    now how do I take out those fieldset frames below the SPAM question and the SUBMIT button


  71. steve responds:
    Posted: July 7th, 2009 at 1:08 pm

    I checked config- i already removed the breaks, now somehow everything got centered???
    I removed one of the fieldset borders, but the other one won’t go away

  72. JFK responds:
    Posted: July 8th, 2009 at 2:57 pm

    great script, easy to install and quite reliable! …thanks.

    just wonder if you consider adding a multiple sender option in a future version … something like:
    <select name="send_email">
    <option class="selected" value="" >Please Choose</option>
    <option value="">dummy1</option>
    <option value="">dummy2</option>
    <option value="">dummy3</option>

    so the form will be send (only) to the contact selected by the user rather than a static address or group of addresses separated by commas (or else like in Amber’s solution)


  73. JFK responds:
    Posted: July 8th, 2009 at 4:54 pm

    thanks for such quick answer.
    your link shows exactly what I meant.
    of course my example would be scraped by bots (thanks for the heads up) but normally I would use it (in a normal html form) when addresses are obfuscated with the help of javascript; it was just the example of how to send the form to a specific destination address.

    I am needing a solution like this for a hand coded web page (no WP) and I guess I have either to customize your script (if I am legally allowed to do that …. keeping the credits I guess) or to come up with something else.

    what I love the most of your script is the human input validation (CAPTCHA-text?) and this is why I would like to try to customize this script first before moving somewhere else.

    thanks again

  74. Tarleton responds:
    Posted: July 18th, 2009 at 11:59 pm

    Hi. Using your form on a site I am currently working on. but when you click submit it doesn’t send all the information:

    First Name: Joe

    Last Name: Blogs

    Email Address:

    Telephone Number: 111111111

    Date of Reservation: 25 / / 2021

    Time of Reservation: 10:6 pm
    Number of People: 18 People

    Special Requests:

    As you can see it doesn’t send the Special Requests nor does it send the month. Any help apppreicated.

  75. Erik responds:
    Posted: August 12th, 2009 at 8:08 am

    Form Version: v3 - Build Number: B3.20081118.01 - Model Number: SASU

    I’m on a GoDaddy Windows server and was getting several errors after form submission saying:
    mail() [function.mail]: SMTP server response: 451 See in path_to_php_file on line #…

    I searched and found this site and its commenters that told me to replace \n with \r\n. I searched my function.php file and simply did a Replace All on \n to \r\n and now my form works perfectly (I think).

    Was the Replace All an okay thing to do? Is this an error others are getting?

  76. James responds:
    Posted: August 17th, 2009 at 9:13 am

    Hi, Could you tell me what the various error codes in error-log.txt mean? The form seems to be working fine, but I notice that the code in the error-log.txt file seems to swap around between 1190 and 1230. I can’t find any documentation as to what either of these mean. Help!

  77. STEVE responds:
    Posted: August 17th, 2009 at 1:42 pm

    Great form Mike!

    I have a question though, I would like a customer to be able to upload a file AND fill out their information in the same form.

    Then once they upload a file, it shows the name of the file they upload in the email.

    make any sense? how would i go about doing this?

  78. STEVE responds:
    Posted: August 17th, 2009 at 3:39 pm

    did that,
    one more quick question.. i want the user to be able to upload pdf files as well, which file do i change this in?

  79. STEVE responds:
    Posted: August 17th, 2009 at 4:29 pm


  80. George Smith responds:
    Posted: August 18th, 2009 at 3:10 am

    Mike - This is a brilliant form, thank you!

    My query is this:

    Has anyone got it to work in Safe Mode, or, do you plan on making a version to run when PHP Safe Mode is on?


  81. STEVE responds:
    Posted: August 19th, 2009 at 8:38 am

    how would I change the title of a field, for example, instead of ZIP CODE I want it to say FILE NAME how/is this even possible?

    thank you

  82. George Smith responds:
    Posted: August 19th, 2009 at 5:31 pm

    Hi Mike!
    Thank you for responding, it wasn’t a personal request for you, just wanted to know if anyone out there that has fiddled with the code has managed to get it to work.
    However, I am very glad you have taken an interest :)

    With SAFE MODE ON in PHP it turns off the 5th variable in the mail function:

    SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE. in /var/www/vhosts/ on line 1145, referer: […]

    and if you have the option to send the message back to the user as well:

    SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE. in /var/www/vhosts/ on line 1154, referer: […]

    this relates to this line in the code:

    mail(”$send_email”,”[$web_site] $subject_value”,$mail_content,$mail_header,$param);


    mail(”$email_value”,”[$cc_cc_text] $subject_value”,$cc_mail_content,$cc_mail_header,$param);


    I assume it relates to “$param”

    I tried to follow it through the functions.php but as I don’t really understand how the mail function works in the first place I thought I would ask first to see if anyone came up with a solution already.

    If there is a possibility of having the form work with SAFE MODE ON then I’d be very happy.
    I’ve had to resort to a lesser form now and it’s just not the same.

  83. George Smith responds:
    Posted: August 20th, 2009 at 6:04 pm

    Hi Mike,
    Yeah, I guess I should have tried that, thinking about it, it seemed like the only place $param was used was for the switches.
    Anyway, just to report, it worked :)

    If anyone else runs into the problem of SAFE MODE ON on your server and not being able to change it the following should work:

    Change the following in functions.php on lines 1145 & 1154:

    mail("$email_value","[$cc_cc_text] $subject_value",$cc_mail_content,$cc_mail_header,$param);


    mail("$email_value","[$cc_cc_text] $subject_value",$cc_mail_content,$cc_mail_header);

    (You are basically removing the following text “,$param“)

    I think this also mean that the following in CONFIG.php as to be at it’s default value (included below):

    $neg_f_param = "yes"; // Or "no" (if needed)
    $smtp_sneak = "no"; // Or "yes" (if needed)
    $ini_set = "no"; // Or "yes" (if needed)

    Hope that helps anyone else.

  84. George Smith responds:
    Posted: August 20th, 2009 at 6:09 pm

    Apologies, the following bit is slightly incorrect, Mike can you ammend?

    Change the following in functions.php on lines 1145 & 1154:

    mail("$email_value","[$cc_cc_text] $subject_value",$cc_mail_content,$cc_mail_header,$param);


    mail("$email_value","[$cc_cc_text] $subject_value",$cc_mail_content,$cc_mail_header);


    Change the following in functions.php on line 1145:

    mail("$send_email","[$web_site] $subject_value",$mail_content,$mail_header,$param);
    mail("$send_email","[$web_site] $subject_value",$mail_content,$mail_header);

    &amp; line 1154:

    mail("$email_value","[$cc_cc_text] $subject_value",$cc_mail_content,$cc_mail_header,$param);
    mail("$email_value","[$cc_cc_text] $subject_value",$cc_mail_content,$cc_mail_header);

  85. Edward responds:
    Posted: August 27th, 2009 at 10:08 am

    Thank for the great work you do for Wordpress users.

  86. James T responds:
    Posted: August 29th, 2009 at 6:57 am

    Hi Mike,

    I am running the latest WP build 2.8.4 and your latest from the plugin repo Version v.2.0WP B20080731
    I recently started to get

    Results: Whoops! Error Made!

    Referrer Missing or Mismatch: It looks like you’re trying to post remotely or you have blocked referrers on your user agent or browser. Using your “Back” button, please go back and try again or use our regular email, [email removed], to circumvent Referrer Mismatch.

    I could see you had a fix for this back in 2006 but doesnt apply to this version in 09.

    I have tried deactivating all my plugins and the error is still there, I did install a redirect plugin to redirect 404 to a 301

    Thanks in advance for any assistance the contact form is

  87. James T responds:
    Posted: August 29th, 2009 at 7:08 am


    I just relaised that I changed my email to google apps and the mail server is external to my web server now. I am hoping that there is a easy fix for it, maybe adding google apps support might be a new feature ?

    Funnily enough my formbuilder and other forms work though and dont care about the internal mail server ??? maybe there is something about your contact form that relies on the local mail server….. or maybe thats not related at all …?

  88. Ergin responds:
    Posted: September 8th, 2009 at 3:30 pm

    My form works perfect accept if some one uses Turkish keyboard. Certain Turkish characters just messes up the writing. It becomes unreadable.
    In $char_set = I tried to use ISO 8859-9 as appose to UTF-8 but it did help.
    Can anyone PLEASE help me?
    Thank you.

  89. Ergin responds:
    Posted: September 9th, 2009 at 2:40 am

    Thank you for your answer Mike. There is no option in “CONFIG.php” to change the form to “text/html “.
    Where should I look for to try to change these options please?
    Thank you.

  90. Ergin responds:
    Posted: September 10th, 2009 at 6:02 am

    Thank you again for your answer Mike.
    I quote ” That would be buried deep within the functions.php file “.
    Yes I can see that…obviously it is totally beyond my capability to edit this. I would understand fully if you are not able to help me on this issue. But if you can I would be very grateful.
    Thank you.

  91. Ergin responds:
    Posted: September 11th, 2009 at 3:31 am

    Hi Mike,
    I have realized that it’s got nothing to do with your form. The problem is with Office Outlook 2003.
    Very sorry to trouble you.

  92. Timo responds:
    Posted: September 13th, 2009 at 4:39 pm

    Hey Mike,

    First of all, fantastic form. I love it. Best one I’ve come across.

    I’ve tried sending a test email but everytime I hit submit, it tells me some referrer error. I looked on your old support posts and must have missed a solution (if any). I have tried what your config file says // at the beginning of the string). Is there anything I can do to fix this?

  93. Timo responds:
    Posted: September 13th, 2009 at 8:41 pm

    I am using regular 2.0

  94. Lisa responds:
    Posted: September 21st, 2009 at 5:10 pm


    To start. Thanks for this great form plugin. I have used it in the past with great success.

    But, I’m developing a Wordpress site and have tried to use the built in themes that come with the form but they are not recognized. I have triple checked the file permissions on the .css files, they are all set to 666 for reading and writing. I have also removed the plugin completely four times and still the style sheets will not recognize.

    Any suggestions? I appreciate it.

  95. Lisa responds:
    Posted: September 21st, 2009 at 5:25 pm

    Hi again,

    I wanted to get back to you asap before you racked your brain about the question of the built in themes not styling my form.

    I am custom coding a Wordpress theme based on the Kubrick platform and commented out part of the header.php code for the time being. I thought I’d better check other areas of my theme before I spent more time focusing just on your plugin. This commented out code prevented the style sheets for the form from working. Anyway, problem fixed.

    Thanks very much.

  96. Greg responds:
    Posted: September 22nd, 2009 at 9:24 am

    Great form. Up until now no problems. The server I use has a new setting for their spam badmailfrom_list and will not send out email with the envelope_sender as Is there a line of code I could add somewhere so the envelope_sender can be Thanks.

  97. Greg responds:
    Posted: September 22nd, 2009 at 11:00 am

    Oh my, I forgot to mention the version even though I read your instructions.
    I’m using v3

  98. Greg responds:
    Posted: September 22nd, 2009 at 1:29 pm

    I followed your instructions and had no luck. This is a managed server at godaddy and they have been changing the way their servers are filtering outgoing emails, one of which is no email with anonymous will go out. I did have luck with a couple of other forms after I added a line like this putenv('');
    But with your form I’m not sure where to put it. What makes this particular is our domain is hosted on this server but our domain email is with google.

  99. steve responds:
    Posted: September 24th, 2009 at 8:16 am

    Hey Mike
    I’m using v3 of your contact form.

    I would like to be able to change the file formats a user is able to upload

    I need them to be able to upload: .mp3 .mp4 .avi .mov .pdf

    I checked the en (language file), functions.php, form.php and no luck

    where and how do I set these options?

    Thanks again

  100. steve responds:
    Posted: September 24th, 2009 at 8:58 am

    all set..
    thanks Mike

  101. Wendy responds:
    Posted: September 26th, 2009 at 2:01 pm

    I’m in the process of installing the Form Version: v3 - Build Number: B3.20090130.01 - Model Number: SASU. I’m delighted with the features of this form, but would like to add a couple of checkboxes for options my viewers might want to request when they contact me (e.g. “Send me info about blahblah” or “Add me to your mailing list”). I don’t see an easy, straightforward or built-in way to do this; nor have I been able to find much reference to this in the comments or help section. I’m only just starting to learn PHP and since this script is quite complex, I don’t want to try to add it myself without having a better idea of what I’m doing. Is there a straightforward way to do this that I’m not aware of? I think I see formatting specifications for checkboxes in the CSS so checkboxes must be used by some people in the form; I’m just not sure how to add them to the script and make sure I don’t mess it up. Any help with this would be most appreciated. :-) Thanks in advance.

  102. Wendy responds:
    Posted: September 26th, 2009 at 3:43 pm

    Hi Mike,

    Thanks very much for getting back to me, and so quickly! Yes, I considered using the drop-down menu for this, but sometimes my viewer might want to select more than one option. I could put other options in the subject, but then I’m limited to only two options and there are times when I might want to use more. I’m curious why checkbox fields weren’t offered as options for the form? Are there people available who know your form code who could add checkboxes for me? Thanks.

  103. Wendy responds:
    Posted: September 26th, 2009 at 5:55 pm

    Thanks Mike! I’ll try there. Thanks for your help, and thanks for sharing your great script. :-)

  104. jfk responds:
    Posted: October 22nd, 2009 at 2:33 am

    Hi Mike
    I am including your contact form in a client’s website for which they are paying. I didn’t find any related post so I wonder if I am legally authorized to do that.

    The contact form is part of the services offered to the client and I am just doing some (css) customization to the script. Thanks in advance.

  105. jfk responds:
    Posted: October 22nd, 2009 at 2:52 am

    sorry…. I just read the disclaimer within the form.php; question answered! thanks for your great script.

    By the way, I did a script customization in order to have multiple choice of recipient addresses selectable by the visitor like “to contact John, click here or to contact Mary click here” (or anchors on the names) then launch the form and send the message to the specific recipient (I hope I explain myself clearly)

    This customization is a php script within the CONFIG.php file (based on other post here) combined with mod_rewrite (for people who has such option in their servers).

    Please let me know if you think this solution would be useful for somebody and if this is the right place to share.

    thanks again

  106. jfk responds:
    Posted: October 22nd, 2009 at 5:52 am

    I know that a form select is available for the WP version but this solution is for the GBCF-v3 that works in any standard web page (when mod_rewrite is available)

  107. Ruth responds:
    Posted: October 30th, 2009 at 9:58 am


    Great Plug-in! I just wondered if you could get rid of the message or make it optional as people don’t always seem to realise they have to add a message and when they don’t it causes an error!

    Any help would be MUCH apprciated…



  108. Ruth responds:
    Posted: October 30th, 2009 at 11:34 am

    Thanks Mike. I’m not really sure how to do that so any pointers would be amazing! They just want people to register their interest so it would be better if this was optional. Also can you remove the option for them to add their web address?

    Thanks so much for you help


  109. Poli responds:
    Posted: October 30th, 2009 at 3:15 pm

    Hello Mike,

    Thanks for the plugin. I love that it can take as much style as one wants. I’m using v.2.0WP B20080731

    What I want now is to put two different forms in the same site on different pages. One with minimun fields and the other with most of them. No problem there. But how can I install two forms? It seems that I can’t install two scripts. Can I? Perhaps there’s another way of doing it. The two forms need to call the same CSS so I only need to be able to edit the structure of the forms and possibly tell them to go to a different email. I just need the two forms to process data independently. I believe v3 allows that by just changing the name of the form. Couldn’t find a similar solution for v2.0WP. Any help will be appreciated.

    Thanks Poli

  110. Poli responds:
    Posted: October 30th, 2009 at 4:46 pm

    Thanks for your reply, Mike. A shame that cannot be done. I got so used to your form that can’t get myself to use another one for the second one.

  111. James responds:
    Posted: November 3rd, 2009 at 11:34 pm

    Hey Mike!

    Great contact form! I just had a quick question. Where would I go about removing validation for the Name and Subject fields? I can remove the actual fields, but can’t figure out where to remove the validation. I only want to have an E-mail field, Message field, and the Spam protection field if possible. Thanks!

  112. René Box responds:
    Posted: November 11th, 2009 at 7:26 pm

    Hi Mike,

    Came across a little error in the form.php script (at least my validator tells me that there are empty span tags.

    I had a look at form.php and found that the error is generated by the following line:

    '.$required_combo.''; ?>

    I’ve changed it to:

    The empty span tag error has now gone.

    Please not that I’ve never before touched php so I don’t know whether my correction has any detrimental effect but as far as I can tell, everything still works :-)

    Maybe you can look into this?


    René Box

  113. René Box responds:
    Posted: November 11th, 2009 at 7:39 pm

    Ok, it look like it is not allowing me to post the lines of code….

    Is there any way of posting the code or do I need to email it to you?


    René Box

  114. René Box responds:
    Posted: November 11th, 2009 at 7:56 pm

    Try again:

    This line seems to generate the W3C validation error:

    '.$required_combo.''; ?>

    Changed it to:

    Hope it works this time :-)

    No, I used Notepad++…. I am aware that Dreamweaver or word messes with the formatting but the error is in the original form.php ==> line 90


    René Box

  115. René Box responds:
    Posted: November 11th, 2009 at 8:00 pm

    I will get there :-)


    <label class="opt-label main-label">'.$required_combo.''; ?>


    <label class="opt-label main-label">

    René Box

  116. René Box responds:
    Posted: November 11th, 2009 at 8:08 pm

    Hmmm…. Try again…..


    <label class="opt-label main-label"><?php echo $main_label; echo'<span>'.$required_combo.'</span>'; ?></label><?php echo $add_break; ?>


    <label class="opt-label main-label"><?php echo $main_label; ?><?php echo $required_combo; ?></label><?php echo $add_break; ?>

    René Box

  117. René Box responds:
    Posted: November 11th, 2009 at 8:19 pm

    P.S. I use the HTML validator add-on for Firefox to check for errors on my webpages.

    I parsed the php form (form.php) into my existing HTML page and the page it generates when opened on-line shows <span>&lt/span> i.e. an empty span tag which seems to be generated by line 90 in form.php

    René Box

  118. René Box responds:
    Posted: November 12th, 2009 at 7:22 am


    If you create a new HTML page and put the css and java link in the head, then parse the form.php in the body and open the HTML page once uploaded, look at the source code of the generated page. Around the “Required” label you will see an empty <span>&lt/span&gt; tag.


  119. René Box responds:
    Posted: November 12th, 2009 at 9:01 am

    Ok, thanks for explaining that.

    But if the option is not used would my rewrite of the code (second line I posted) to get rid of the empty span tags have any detrimental effect i.e. is the code correct?

    As I said, I don’t know anything about coding in php. I just used my imagination :-)


  120. René Box responds:
    Posted: November 12th, 2009 at 10:04 am

    Hi Mike,

    Just had a look at the Nl and Be translations of the language files (they are both identical) and noted that there are quite a few incorrect translations in both files. I am Dutch from origin but live in the U.K.

    Would you like me to correct them?


  121. GM responds:
    Posted: November 16th, 2009 at 11:20 pm

    Great form, love the implementation and config.

    One thing though:
    eregi() is depreciated and throws up errors in XAMMP (guess it is using php5). Can this be replaced in functions.php with str_replace()??

  122. Kim responds:
    Posted: December 1st, 2009 at 6:48 pm

    I usually do a search for the V.2 contact form plug in name via my wp dashboard, and then just click install .. simple. Your plug in isn’t coming up on the search. So I thought .. brilliant I’ll simply search for the authors name .. Mike Cherim … nothing. Beast-Blog…. nothing. So then I think well I’ll download the zip and upload it, no problems. It installs, but I get an error message on the activation saying ‘ no header’ . I come here and it says ‘have you unzipped the zip file?’. Well I’ve never installed a plug in this way so I go back to my desktop, unzip the zip file and try to upload again but it actually says to use the zip file and it won’t choose any of the unzipped folders or files. So here I sit, really really wanting to use your plug in, it looks great and the feedback is excellent, but I’m out of options and ideas. Thought perhaps you might have one or two??

  123. Kim responds:
    Posted: December 3rd, 2009 at 10:20 pm

    yeah I do it both ways ( as the song goes ~). I’m wondering why it doesn’t come up on the wordpress search and whether that is because it doesn’t have some sort of official name that wordpress can pick up? That’s perhaps called a header? I’ve never had a plugin not show up on the search function before. I want to put it on all my sites so I’m curious about this.

  124. Kim responds:
    Posted: December 3rd, 2009 at 10:33 pm

    Okay, so what I did was upload the zip file into the plugin folder using cPanel, and unzip it there, then delete the zip file and that worked. Thanks Mike, I’m looking forward to using it. xxKim

  125. Bernard responds:
    Posted: December 20th, 2009 at 11:54 pm

    I’ve followed all the instructions but when i want to incorporate the form in my site i get this error message:

    Warning: include_once() [function.include-once]: URL file-access is disabled in the server configuration in /home/content/s/c/h/schoolsafemfg/html/contactus.php on line 75

    Warning: include_once(http://www.schoolsafemfg/contactform/form.php) [function.include-once]: failed to open stream: no suitable wrapper could be found in /home/content/s/c/h/schoolsafemfg/html/contactus.php on line 75

    Warning: include_once() [function.include]: Failed opening 'http://www.schoolsafemfg/contactform/form.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/s/c/h/schoolsafemfg/html/contactus.php on line 75

    Can you help me?

  126. Avrohom responds:
    Posted: December 29th, 2009 at 2:28 pm

    I am trying to use your powerful looking form in WordPress v 2.9

    but I get the error message:

    “The plugin does not have a valid header”

    I don’t understand the message at the top to unzip the plugin before uploading. On my dashboard for uploading plugins it explicitly says to upload in zip format.
    I tried unzipping first — but then their uploader would only take one file at a time — which seems will fail.

    I don’t think Wordpress recognizes files uploaded through ftp.

  127. Andy responds:
    Posted: January 19th, 2010 at 10:10 am

    Thank you for your brilliant form - I’m a big fan. I wanted to implement it in a hidden element like the ClearLeft site (this seems fully accessible). My problem is the form is hidden on submit whether or not there are any errors - do I need to adapt the form or the hide/show javascript? Any advice much appreciated.

  128. sam responds:
    Posted: January 28th, 2010 at 6:21 am

    Hi there Mike

    Thanks for sharing your form as a non coding designer its a great find. I juat wanted to ask you a little question… how would I make ther fields go from optional to required?

    Many thanks


  129. sam responds:
    Posted: January 28th, 2010 at 1:07 pm

    sorry and you did say to mention that as well!!! Its the new version but not the one for Wordpress. I did have a look but was not sure what was making the fields reqd could you point me in the right direction… thanks for prompt reply BTW


  130. sam responds:
    Posted: January 28th, 2010 at 2:05 pm

    Ok Mike thanks very much will have a look!

  131. HazMatt responds:
    Posted: February 2nd, 2010 at 5:48 pm

    I ran into the same problem as Amber in regards to multiple email addresses in the $send_email variable… it didn’t work with or without the space. The form appeared to process correctly (including the Success! message) but no emails were ever received.

    So, I did the fix Amber prescribed along with the clean_var() function:
    $send_email2 = clean_var($send_email2);
    mail("$send_email2", "[$web_site] $subject_value",$mail_content,$mail_header,$param);

    Just thought I’d let y’all know that that works pretty well. :)

  132. Paul Dollar responds:
    Posted: February 11th, 2010 at 1:37 am

    Hi Mike,

    Been using your form for a few years now and love it. On my first installation I remember having trouble with a referrer mismatch error on form submit and I was able to correct it (probably more by accident than skill or knowledge) It has, however popped up again on a simple site I did for my Brother’s company two years ago. ( I have not changed anything in a few months and it just started happening in the last few days. Any thoughts on what might be going on? I have absolutely no idea.


    Paul Dollar

  133. Paul Dollar responds:
    Posted: February 11th, 2010 at 3:48 pm

    duh… I actually moved the site 6 months ago, I guess we can see now how little traffic it gets as they only noticed it recently :) Thanks for the quick response and I will be sure to do a little more looking next time.


  134. Lenamtl responds:
    Posted: February 15th, 2010 at 9:45 am

    Hi Mike,

    Thanks for your great script.

    How come when I received the form message all data is on the same line (no return between fields)

    Should I need to add /n to have a better message format.

    I have tested into 2 mailbox and this is the same result.

    Any clue


  135. lenamtl responds:
    Posted: February 18th, 2010 at 9:46 pm

    Hi Mike,

    Thanks for the suggestion
    The carriage Return did the trick :)

  136. lenamtl responds:
    Posted: February 23rd, 2010 at 10:02 pm


    I’m trying to have text label and field on the same line
    I know that I can disable
    To make a better look, I have tried to add some float in the css but when doing this the form
    got a little bit mixup.
    So I add a table but I got a parse error…so I have try different way and still having this error.

    Any clue?

    Is anyone have achieve this or have a better solution?

  137. lenamtl responds:
    Posted: February 24th, 2010 at 1:06 pm

    Yes I’m using GBCF-v3.

    Ok I agree with you adding table is not the appropriate solution and using CSS is easier.
    I will investigate why adding float cause problem with some dropdown fields.

    Thanks for your input.

  138. Karen responds:
    Posted: April 18th, 2010 at 9:05 pm

    I’m using gbcf-v3 in PivotX 2.1.0 beta 3. I have two forms on two pages: contact us and free sample. Each one has it’s own folder: gbcf-v3 and freeform. In the header, I have the following:

    [[ if $pagetype=="page" ]]
    <link rel="stylesheet" type="text/css" href="gbcf-v3/files/themes/gray.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="freeform/files/themes/gray.css" media="screen" />
    <!--[if IE]>
    <script type="text/javascript" src="gbcf-v3/files/focus.js"></script>
    <script type="text/javascript" src="freeform/files/focus.js"></script>
    [[ /if ]]

    I don’t think this is right. If you look at the contact us form [], it’s fine, but the free sample [] form looks different. It is suppose to be different, but not with the large spacing between fields. I couldn’t get it to cooperate, so I pasted all the css code for contact us into free sample. I figured, if both css are the exact same, then the forms should look the same. It didn’t help. If I change anything in the free sample css, it affects the layout of the contact form.

    How can I “separate” the two forms’ style sheets so that one does not affect the other? I’ve posted to the PivotX forum, also, but no replies yet.

    Muchas gracias.

  139. Karen responds:
    Posted: April 19th, 2010 at 12:57 am


    I finally had a PivotX response, and it appears that the page editor placed <pre> and <code> tags around the php that calls the form. I removed the tags, and my form is now responding to the css. Whew! I had a feeling it wasn’t a Green Beast problem. Sorry to bother you.


  140. Shawna responds:
    Posted: April 21st, 2010 at 8:24 am

    Yesterday my server was upgraded to PHP 5.2 and I installed the W3 Total Cache plugin. I tested my Contact Form and the e-mails never show up. I also do not get the message at the end saying the e-mail was successfully sent. Instead the page just refreshes.

    Any help in fixing this problem would be greatly appreciated.

    Btw, the contact form was last successfully used on the 4/17

    Thank you :)

  141. Shawna responds:
    Posted: April 21st, 2010 at 12:54 pm

    I re-installed it and it seems to be back to normal now.


  142. VH responds:
    Posted: April 27th, 2010 at 9:34 pm

    Hi Mike - great form, thanks! (using V3)
    One question - I’m trying to add additional fields, and I think I’ve got it alright, but when I add the labels to the language file (using en-us) they don’t show up. I can change the wording of existing items, and the form itself seems to work, so I’m assuming it’s all put together correctly, but if I try to add more labels to the language file and number them subsequently, nothing happens. I’ve made sure to add the variable and the number from the language file to the functions page, but still not working. Is there anywhere else I have to specify it? Thanks!

  143. VH responds:
    Posted: April 28th, 2010 at 3:55 am

    Thanks - I do have the fields in the form page, and the input box shows up on the webpage, but not the label? I’m thinking maybe I’m not adding them correctly to the language file, but maybe I’m just missing something somewhere else?

  144. VH responds:
    Posted: April 28th, 2010 at 5:15 am

    Hi Mike - got it sorted; apparently the list of language to variable assignments and language file are sequentially sensitive; once I made sure both were in the same order (I had them added the label as the next to last item in the language file and the last item in the functions file) the label showed up just fine. Thanks!

  145. VH responds:
    Posted: April 28th, 2010 at 5:30 pm

    Hi Mike - alright, I know you don’t do customizations, but if you could point me in the right direction it would help a lot. I’ve got all the additional text fields and message boxes working perfectly, everything else customized just fine, but I need to add radio buttons. I’ve been running around in circles on it - the form looks just fine on the front end but the selected values aren’t making it to the email. Obvious guess is that the values aren’t in the list when the email is getting created, but they are listed with the rest, so I’m thinking I’m missing something a little higher up on the functions file (I did add the values in the same way I did for the text fields, but that may not be correct), or I don’t have it quite right on the form file. Any ideas? Thanks!

  146. VH responds:
    Posted: April 28th, 2010 at 7:00 pm

    I checked there, and a number of other places already, unfortunately. I’ll post the changes when I figure it out, though.

  147. VH responds:
    Posted: April 29th, 2010 at 12:04 pm

    Okay, I’ve got it working:
    For anyone who has always wanted to add additional fields to this lovely form, I have written up the following directions. Since this is the first time I’ve written up directions like this, I apologize if they are vague, leave anything out or flat out don’t make sense, but I hope it helps someone do this in less time than it took myself by trial and error.

    To add additional fields in the form:
    start with form.php: add in text fields or areas by copying the code already in the form and changing it to reflect the new names etc for the field. To add radio buttons, use the following:

    code removed

    just change “typeplan” to whatever you want to call your item. The way I’ve done it you use the same verbiage from the language file for the label of each button and their values, because it’s a little less to do in the language file, but I assume you can make them different if you want.
    Go to your language file, for example en-us. Add the additional language as needed in the following format:
    [84] PLAN TYPE LABEL TEXT * Plan Type: [85] PLAN TYPE 1 LABEL TEXT * 403 (b)
    [86] PLAN TYPE 2 LABEL TEXT * 401 (k)[87] PLAN TYPE 3 LABEL TEXT * Profit Sharing
    [88] PLAN TYPE 4 LABEL TEXT * Deferred Compensation
    When I open it in Notepad I have boxes directly behind each number bracket, but they disappeared when I copied it to here; I am so new at this I have no idea if that makes a difference. In general follow the format already in the file. Make sure you don’t have any repeat numbers in the brackets, or your file will call the wrong one.
    Go to functions.php. In the language to variable assignment sections, add in your new variables and the corresponding number from the language file, like so:

    $typeplan_label = clean_var(lang_strip($lang_array[84]));
    $typeplan1_label = clean_var(lang_strip($lang_array[85]));
    $typeplan2_label = clean_var(lang_strip($lang_array[86]));
    $typeplan3_label = clean_var(lang_strip($lang_array[87]));
    $typeplan4_label = clean_var(lang_strip($lang_array[88]));

    Make sure they are in the same order as the language file or it will not work.
    Scroll down to the posted data section. Add a new line for each field, like so:

    if(isset($_POST['typeplan'])) {
    $typeplan_value = clean_var($_POST['typeplan']);

    Add a line in the exploit filter matching:

    preg_match($inpt_expl, $typeplan_value) ||

    and below that:

    if(preg_match($inpt_expl, $typeplan_value)) {
    $expl_typeplan = '‘.$typeplan_label.’,’;
    $typeplan_border = $error_border;
    $typeplan_errlbl = $error_label;

    put it in the user message list below that -


    then smarten up the email by adding a section there:

    if($typeplan_value == "") {
    $typeplan_email = "";
    } else {
    $typeplan_email = " $typeplan_label : $typeplan_value\n";

    Finally, put it in the email build here:


    arranging it where you want it to show up in the email.

    Save and upload. You should be able to add as many additional fields as needed this way. At least, it worked for me, and if it doesn’t for you at least you’ve got a starting point.

    Mike, if you want to give this a quick once over just in case anything looks wildly unsafe, and or if you’d like to add radio buttons onto the basic form so people could customize a little easier, feel free. Thanks again!

  148. VH responds:
    Posted: April 29th, 2010 at 12:07 pm

    Well bother, the code tag didn’t take on the first section, let me try to put that one again:
    code removed

  149. VH responds:
    Posted: April 29th, 2010 at 12:10 pm

    Okay, I don’t know why it’s not showing up. And that’s the part that gave me the most fits, too, so I’d like to get it posted where it will show. One more try:
    code removed

  150. VH responds:
    Posted: April 29th, 2010 at 12:14 pm

    <label id="typeplan" for="typeplan" class="opt-label"<?php echo $typeplan_errlbl; ?>><?php echo $typeplan_label; ?>
    <abel id="typeplan1" for="typeplan" class="opt-label"> <input type="radio" name="typeplan" value="<?php echo $typeplan1_label; ?>" /><?php echo $typeplan1_label; ?></label>
    <label id="typeplan2" for="typeplan" class="opt-label"> <input type="radio" name="typeplan" value="<?php echo $typeplan2_label; ?>" /><?php echo $typeplan2_label; ?></label>
    <label id="typeplan3" for="typeplan" class="opt-label"> <input type="radio" name="typeplan" value="<?php echo $typeplan3_label; ?>" /><?php echo $typeplan3_label; ?></label>
    <label id="typeplan4" for="typeplan" class="opt-label"><input type="radio" name="typeplan" value="<?php echo $typeplan4_label; ?>" /><?php echo $typeplan4_label; ?></label>

  151. VH responds:
    Posted: April 29th, 2010 at 12:15 pm

    hah, maybe if I’d followed directions the first time…

  152. Jonathan Harris responds:
    Posted: May 10th, 2010 at 8:16 am

    Hi, installed GBCF-V3 and got it working in a ‘draft’ subdirectory on my public_html folder on my host. Now its gone live, I moved everything out of the draft subdirectory into public_html and updated all my links. Everything works fine, inluding a PHP guestbook I have on there but the form gives me this error:

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(../../ is not within the allowed path(s): (/home/fastglob:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/fastglob/public_html/assets/gbcf-v3/form.php on line 48

    Not sure what gives? I have checked and double checked, my paths and links. But just the process of moving the form seems to have broken something.

    Thanks in advance :)

  153. scott farrell responds:
    Posted: May 25th, 2010 at 8:59 pm

    I found its easy to clash some of the themes in your plugin, with others already on my site

    for example, blue_anvil contains class=’button” for for to be submitted.

    If you pre fix everything with gbcf - it would avoid the clash. class=”gbcf_button”

    using WordPress-Ready Contact Form v.2.0WP

  154. Gary responds:
    Posted: May 30th, 2010 at 5:30 pm

    Great script. A problem now occured since hosts upgraded server upgraded to php 5.3 ..

    Deprecated: Function eregi() is deprecated in public_html/gbcf-v3/files/functions.php on line 744
    Deprecated: Function eregi() is deprecated in public_html/gbcf-v3/files/functions.php on line 747
    Deprecated: Function eregi() is deprecated in public_html/gbcf-v3/files/functions.php on line 750
    Deprecated: Function eregi() is deprecated in public_html/gbcf-v3/files/functions.php on line 753
    Deprecated: Function eregi() is deprecated in public_html/gbcf-v3/files/functions.php on line 849

    I tried replacing with preg_match but I could not get it to work

    I tried replacing with str_replace and again it didn’t work.
    Anyone have any ideas ?

  155. Gary responds:
    Posted: May 30th, 2010 at 5:53 pm

    Holy hell I have fixed it !

    First time in my life. Hopefully an expert here can check it and if its ok then maybe it can be used in an update…

    Firstly I replaced all eregi with preg_match


    line 744 … I replaced

    if(preg_match("Windows", $ua ) && preg_match("msie", $ua) && preg_match("[7]",$ua)) {
    $nua = "IE 7 on Windows";


    if(preg_match("/Windows/i", $ua ) && preg_match("/msie/i", $ua) && preg_match("[7]",$ua)) {
    $nua = "IE 7 on Windows";

    Then repeated the same all the way down to line 804, making the same changes and it works. I am not a php coder so please can someone check that I have not made the script vulnerable.


  156. isengaurd responds:
    Posted: June 20th, 2010 at 8:40 pm

    I am using your latest release for Wordpress. I have an issue that I have not seen on either page of comments: no matter how I fill out the configuration page, the parameters do not save, even when the update successful message comes up at the top of the config page. I have followed all directions in the read me. I must have missed something somewhere…
    I have no idea what could be causing this. I have looked at the WP error log and not found anything relevant (afaik). Any suggestions? Every time i go to the config page, it defaults to the unconfigured state that it shows at install. All of the files in the wp-gbcf directory are set for 666, for what its worth.

    Thanks for any help :)

  157. isengaurd responds:
    Posted: June 21st, 2010 at 12:24 am

    Ok, will do. Thanks for taking the time. Hope it’s something simple…

  158. VH responds:
    Posted: September 1st, 2010 at 1:44 am

    More questions - client wants to use reCaptcha with this form. Possible?

  159. VH responds:
    Posted: September 1st, 2010 at 10:59 am

    They think the question/answer thing is silly. That’s the main reason. :)

  160. VH responds:
    Posted: September 2nd, 2010 at 7:54 am

    I think I talked them into keeping the text. Thanks for the suggestion though. :)

  161. Sharon responds:
    Posted: September 11th, 2010 at 5:36 pm

    Newbie Here….
    Per your install instructions below for Secure and Accessible PHP Contact Form….Where do I find Write Page, On Configuration - no place to add the URL, Where is Manage section, Page file open - is this the New Page where the form is going to go?

    On my admin Contact Form section I have Overview, Configuration, Styling and Documentation

    #6 Once configured as much as you can, go to the “Write” page and click the “Write Page” If using a default page template give it a name like “Contact Page,” for example.
    #7 Now go back to the “Configuration” page and add the URL of your newly-created form page. “Save” your changes.
    #8 Now go to “Manage” and click on “Edit Pages” link on the sub-menu. Then locate your contact page an click on the “Edit” link to the right of it.
    #9 With the page file open, add this code to the text area and “Save” the page.

    Thank you for your help.

  162. Sharon responds:
    Posted: September 11th, 2010 at 10:46 pm

    Thank you Mike. Do you have contact information for Mike Jolley?

  163. Clayton Tycksen responds:
    Posted: September 25th, 2010 at 1:01 am

    Hi Mike,

    Awesome form - it’s working perfectly for me on Safari, Firefox, Opera, and Chrome, on both Mac and Windows. BUT on IE8 I get nothing. No errors, no success, nothing. The exact same thing happens with the test-form.php - it also works on every browser except IE8, without modification.

    I’m referring to v3. Has anyone else seen this happen?

    Validation checks out.

    Thanks for the awesome script!


  164. Clayton Tycksen responds:
    Posted: September 25th, 2010 at 1:16 am

    FRESH install, re-edited my CONFIG.php and en-us language pages, didn’t touch anything else. Uploaded all, and it works now, even IE8.

    Not sure what happened. Just goes to show that it’s always the user’s fault, eh?

    Thanks for the form!

    Here’s hoping for an IE-free Internet someday. Cheers!


  165. Tim Jefferies responds:
    Posted: December 31st, 2010 at 3:30 am

    For those with the thankyou page redirect problem.
    This fixed it for me.

    in function.php:

    if($thankyou_page == "yes") {
    echo "";
    ###@header('refresh: 0; url='.$thankyou_url.'');## old redirect

  166. Derek Beck responds:
    Posted: January 15th, 2011 at 6:13 am

    I saw the previous response on reCAPTCHA… is it really that hard to integrate with this? I understand you have plenty of security steps, but part of my desire for reCAPTCHA is that I am a writer, and having working with old documents and scans for the research for my first (forthcoming…) book, I like the idea that reCAPTCHA is also helping to digitize books. So I’m sort of dead-set on using it with my contact forms. What are your thoughts on the ease of integrating it with your php form? Thanks! Derek

  167. lena responds:
    Posted: February 13th, 2011 at 12:04 pm


    I’m trying to fix the code using Gary example:

    if(preg_match("Windows", $ua ) && preg_match("msie", $ua) && preg_match("[7]",$ua)) {
    $nua = "IE 7 on Windows";


    if(preg_match("/Windows/i", $ua ) && preg_match("/msie/i", $ua) && preg_match("[7]",$ua)) {
    $nua = "IE 7 on Windows";

    but I’m wondering what will be for other different strings like:

    else if(preg_match("Macintosh", $ua ) && preg_match("camino", $ua)) {
    $nua = "Camino on Mac";


    else if(preg_match("Windows", $ua ) && preg_match("safari", $ua)) {
    $nua = "Safari on Windows";

    Thanks for your help

  168. lena responds:
    Posted: February 13th, 2011 at 2:21 pm

    ok but what will be the replacement for these 2 strings, these are different from the first strings

    else if(preg_match("Macintosh", $ua ) && preg_match("camino", $ua)) {
    $nua = "Camino on Mac";

    and for this one

    else if(preg_match("Windows", $ua ) && preg_match("safari", $ua)) {
    $nua = "Safari on Windows";

  169. Evan responds:
    Posted: March 1st, 2011 at 9:02 pm

    Hello Mike, I really like your script. I tried it and it works perfectly. Could you please explain in more detail how can I disable the security question? I know, you said that one should “hard code the answer and comment the thing out” in form.php but I am kinda lost.


  170. Evan responds:
    Posted: March 2nd, 2011 at 9:41 am

    Thank you for the swift response Mike! However, I had no success. The thing is that the only value=”" that I can find in form.php is at line176 (next to name=”honeypot”). When I fill that in with the answer, nothing happens. However, I found that the answer field is filled with my answer when I replace value=”" with value=”my answer” in line 171. Unfortunately, I can’t comment it out -it just displays /* */ between the fields. What am I doing wrong? Could you please tell me specifically which lines must I comment out?

    Thanks again, I know that it is crazy to remove the anti-spam question, but I have a similar client as VH who prefers captcha (duh!) instead of a logical question. He finds the latter “stupid and looking as we are mocking our visitors”. I will have to rely to the other security measures of your form to prevent spambots and hopefuly convince him in the future to use the anti-spam question.

  171. Evan responds:
    Posted: March 2nd, 2011 at 10:09 am

    OK got it right with the commenting, thanks. But now, when I press “send”, I get a “Notice: Undefined index: antispam in C:\inetpub\wwwroot\gbcf-v3\files\functions.php on line 668″ mesage. Should I edit something in functions.php as well or just leave the whole thing as you originally made it to work?

  172. matthew responds:
    Posted: March 7th, 2011 at 5:58 am

    Having just installed and activated your contact form plug-in, I’m struggling to locate the “Contact Form” page, which I understand should be listed on my WP 3.1 navigation menu. I know that the recent 3.1 upgrade made a few other things less obvious, any chance that it’s affecting accessibility to the Contact Form page? Or am I just not seeing something obvious? Thanks for a little guidance.

  173. matthew responds:
    Posted: March 7th, 2011 at 6:05 am

    I knew that I’d see my answer as soon as I post my question…but for any other newbies using WP 3.1, the “Contact Form” page is found by clicking a blank (icon-less) button at or near the bottom of the WP navigation menu bar.

  174. John responds:
    Posted: March 15th, 2011 at 2:09 pm

    Hi Mike,
    Thanks so much for the form - I’ve used it before with success… but am having trouble getting it to work on a new WP site. Please excuse my ignorance in advance (i am a designer with limited coding abilities). The form loads fine as you can see here:

    but on submit, I get a 404 error. The only thing I could think of is that the form is trying to add the variable “#results” to the URL.. and the permalink structure I am using writes pages as directories (”/contact/”) instead of .php files. I’m not totally certain that this is my problem, and I’ve set the permalink structure back to the WP default and still got the error… but I am at a loss. Any suggestions you may have would be greatly appreciated… I understand if you are too busy to help me with my stupidity ;)

  175. John responds:
    Posted: March 15th, 2011 at 3:06 pm

    thanks for the reply, i switched the permalink to have the slash, and still no luck. Oh well, i’ll try moving things around a bit more and see if i can figure it out.

    thanks again!

  176. Dave responds:
    Posted: April 13th, 2011 at 9:11 am

    Hi Mike,

    Always been a big fan of your contact forms. I managed pretty well with version 2 to edit the form the way I needed it, However, in version 3 I am having dificulty denoting the Phone Number field as a required/obligatory field. Any advice ou may be able to give will be greatly appriciated!


  177. Dave responds:
    Posted: April 13th, 2011 at 10:25 am

    Thanks for reply Mike.

    Its ok, I have done it now. Its like you just said : functions.php and form.php. Actually, once you know where things are, its not that bad.

    Done now anyway, Thanks

  178. Steve responds:
    Posted: April 25th, 2011 at 5:08 pm

    I use this in Spanish, utf-8.
    If the sender name contained accented characters I found that emails received in Outlook 2007 would have the accented characters corrupted in the header only, while the message body would be fine.
    It appears the header info must be encoded for this to display correctly.
    To cut a long story short, this was the only fix I found that worked:
    in functions.php at line 700: find
    $mail_header = "From: $name_value <$mailfrom_value>\n"."Reply-To: $name_value <$email_value>\n"."MIME-Version: 1.0\n"."Content-type: text/plain; Content-language: $language; charset=\"$char_set\"\n"."Content-transfer-encoding: quoted-printable\n\n\r\n";
    and change it to
    //encode $name_value
    $name_value_header = '=?' . 'UTF-8' . '?Q?' . preg_replace('~[\x80-\xFF=?_]~e', '\'=\' . strtoupper(dechex(ord(\'$0\')))', $name_value) . '?=';
    // $name_value changed to $name_value_header in next line
    $mail_header = "From: $name_value_header <$mailfrom_value>\n"."Reply-To: $name_value_header <$email_value>\n"."MIME-Version: 1.0\n"."Content-type: text/plain; Content-language= $language; charset=\"$char_set\"\n"."Content-transfer-encoding: quoted-printable\n\n\r\n"

  179. Frank Hagan responds:
    Posted: May 29th, 2011 at 1:12 pm

    Mike - my compliments on the script; one of my customers notified me he was using it and the recent upgrade to PHP on the server was showing some errors in the error_log file. I was happy to see that you support the script so well.

    For the replacement of the deprecated “eregi” function that Gary fixed above, here is the complete code block that has worked for me. First, download the /gbcf-v3/files/functions.php file, copy it to another folder as an archive you can always return to, and edit the original. Replace this entire section:

    ### Sniff browsers to return a better string
    if(eregi("Windows", $ua ) && eregi("msie", $ua) &&  eregi("[7]",$ua)) {
        $nua = "IE 7 on Windows";
    else if(eregi("Windows", $ua ) && eregi("msie", $ua) &&  eregi("[6]",$ua)) {
        $nua = "IE 6 on Windows";
    else if(eregi("Windows", $ua ) && eregi("msie", $ua) &&  eregi("[5-3]",$ua)) {
        $nua = "Old IE on Windows";
    else if(eregi("Windows", $ua ) && eregi("firefox", $ua)) {
        $nua = "Firefox on Windows";
    else if(eregi("Windows", $ua ) && eregi("opera", $ua)) {
        $nua = "Opera on Windows";
    else if(eregi("Windows", $ua ) && eregi("mozilla", $ua)) {
        $nua = "Mozilla on Windows";
    else if(eregi("Windows", $ua ) && eregi("netscape", $ua)) {
        $nua = "Netscape on Windows";
    else if(eregi("Windows", $ua ) && eregi("flock", $ua)) {
        $nua = "Flock on Windows";
    else if(eregi("Windows", $ua ) && eregi("safari", $ua)) {
        $nua = "Safari on Windows";
    else if(eregi("Macintosh", $ua ) && eregi("camino", $ua)) {
        $nua = "Camino on Mac";
    else if(eregi("Macintosh", $ua ) && eregi("firefox", $ua)) {
        $nua = "Firefox on Mac";
    else if(eregi("Macintosh", $ua ) && eregi("opera", $ua)) {
        $nua = "Opera on Mac";
    else if(eregi("Macintosh", $ua ) && eregi("mozilla", $ua)) {
        $nua = "Mozilla on Mac";
    else if(eregi("Macintosh", $ua ) && eregi("netscape", $ua)) {
        $nua = "Netscape on Mac";
    else if(eregi("Macintosh", $ua ) && eregi("seamonkey", $ua)) {
        $nua = "Seamonkey on Mac";
    else if(eregi("Macintosh", $ua ) && eregi("safari", $ua)) {
        $nua = "Safari on Mac";
    else if(eregi("Linux", $ua ) && eregi("konqueror", $ua)) {
        $nua = "Konqueror on Linux";
    else if(eregi("Linux", $ua ) && eregi("firefox", $ua)) {
        $nua = "Firefox on Linux";
    else if(eregi("Linux", $ua ) && eregi("mozilla", $ua)) {
        $nua = "Mozilla on Linux";
    else if(eregi("Linux", $ua ) && eregi("opera", $ua)) {
        $nua = "Opera on Linux";
    else if(eregi("FreeBSB", $ua ) && eregi("firefox", $ua)) {
        $nua = "Firefox on Free BSD";
    else {
        $nua = $unk_useragent;

    With this code:

    ### Sniff browsers to return a better string
    if(preg_match("/Windows/i", $ua ) && preg_match("/msie/i", $ua) && preg_match("[7]",$ua)) {
    $nua = "IE 7 on Windows";
    else if(preg_match("/Windows/i", $ua ) && preg_match("/msie/i", $ua) && preg_match("[6]",$ua)) {
    $nua = "IE 6 on Windows";
    else if(preg_match("/Windows/i", $ua ) && preg_match("/msie/i", $ua) && preg_match("[5-3]",$ua)) {
    $nua = "Old IE on Windows";
    else if(preg_match("Windows", $ua ) && preg_match("firefox", $ua)) {
    $nua = "Firefox on Windows";
    else if(preg_match("Windows", $ua ) && preg_match("opera", $ua)) {
    $nua = "Opera on Windows";
    else if(preg_match("Windows", $ua ) && preg_match("mozilla", $ua)) {
    $nua = "Mozilla on Windows";
    else if(preg_match("Windows", $ua ) && preg_match("netscape", $ua)) {
    $nua = "Netscape on Windows";
    else if(preg_match("Windows", $ua ) && preg_match("flock", $ua)) {
    $nua = "Flock on Windows";
    else if(preg_match("Windows", $ua ) && preg_match("safari", $ua)) {
    $nua = "Safari on Windows";
    else if(preg_match("Macintosh", $ua ) && preg_match("camino", $ua)) {
    $nua = "Camino on Mac";
    else if(preg_match("Macintosh", $ua ) && preg_match("firefox", $ua)) {
    $nua = "Firefox on Mac";
    else if(preg_match("Macintosh", $ua ) && preg_match("opera", $ua)) {
    $nua = "Opera on Mac";
    else if(preg_match("Macintosh", $ua ) && preg_match("mozilla", $ua)) {
    $nua = "Mozilla on Mac";
    else if(preg_match("Macintosh", $ua ) && preg_match("netscape", $ua)) {
    $nua = "Netscape on Mac";
    else if(preg_match("Macintosh", $ua ) && preg_match("seamonkey", $ua)) {
    $nua = "Seamonkey on Mac";
    else if(preg_match("Macintosh", $ua ) && preg_match("safari", $ua)) {
    $nua = "Safari on Mac";
    else if(preg_match("Linux", $ua ) && preg_match("konqueror", $ua)) {
    $nua = "Konqueror on Linux";
    else if(preg_match("Linux", $ua ) && preg_match("firefox", $ua)) {
    $nua = "Firefox on Linux";
    else if(preg_match("Linux", $ua ) && preg_match("mozilla", $ua)) {
    $nua = "Mozilla on Linux";
    else if(preg_match("Linux", $ua ) && preg_match("opera", $ua)) {
    $nua = "Opera on Linux";
    else if(preg_match("FreeBSB", $ua ) && preg_match("firefox", $ua)) {
    $nua = "Firefox on Free BSD";
    else {
        $nua = $unk_useragent;

    Save and upload the file, replacing the /gbcf-v3/files/functions.php file.

  180. Frank Hagan responds:
    Posted: June 29th, 2011 at 9:36 am

    Well, unfortunately my code above is now throwing a “Delimiter must not be alphanumeric or backslash in functions.php line …”, so my solution above does not work. I will report back when I figure out how to fix it.

  181. Frank Hagan responds:
    Posted: June 29th, 2011 at 9:45 am

    OK, I’m officially an idiot. I didn’t escape the OS or browser name in all of the entries (I only had them escaped in the first three). Here’s the corrected code snippet:

    ### Sniff browsers to return a better string

    if(preg_match("/Windows/i", $ua ) && preg_match("/msie/i", $ua) && preg_match("[7]",$ua)) {
    $nua = "IE 7 on Windows";
    else if(preg_match("/Windows/i", $ua ) && preg_match("/msie/i", $ua) && preg_match("[6]",$ua)) {
    $nua = "IE 6 on Windows";
    else if(preg_match("/Windows/i", $ua ) && preg_match("/msie/i", $ua) && preg_match("[5-3]",$ua)) {
    $nua = "Old IE on Windows";
    else if(preg_match("/Windows/i", $ua ) && preg_match("/firefox/", $ua)) {
    $nua = "Firefox on Windows";
    else if(preg_match("/Windows/i", $ua ) && preg_match("/opera/", $ua)) {
    $nua = "Opera on Windows";
    else if(preg_match("/Windows/i", $ua ) && preg_match("/mozilla/", $ua)) {
    $nua = "Mozilla on Windows";
    else if(preg_match("/Windows/i", $ua ) && preg_match("/netscape/", $ua)) {
    $nua = "Netscape on Windows";
    else if(preg_match("/Windows/i", $ua ) && preg_match("/flock/", $ua)) {
    $nua = "Flock on Windows";
    else if(preg_match("/Windows/i", $ua ) && preg_match("/safari/", $ua)) {
    $nua = "Safari on Windows";
    else if(preg_match("/Macintosh/i", $ua ) && preg_match("/camino/", $ua)) {
    $nua = "Camino on Mac";
    else if(preg_match("/Macintosh/i", $ua ) && preg_match("/firefox/", $ua)) {
    $nua = "Firefox on Mac";
    else if(preg_match("/Macintosh/i", $ua ) && preg_match("/opera/", $ua)) {
    $nua = "Opera on Mac";
    else if(preg_match("/Macintosh/i", $ua ) && preg_match("/mozilla/", $ua)) {
    $nua = "Mozilla on Mac";
    else if(preg_match("/Macintosh/i", $ua ) && preg_match("/netscape/", $ua)) {
    $nua = "Netscape on Mac";
    else if(preg_match("/Macintosh/i", $ua ) && preg_match("/seamonkey/", $ua)) {
    $nua = "Seamonkey on Mac";
    else if(preg_match("/Macintosh/i", $ua ) && preg_match("/safari/", $ua)) {
    $nua = "Safari on Mac";
    else if(preg_match("/Linux/i", $ua ) && preg_match("/konqueror/", $ua)) {
    $nua = "Konqueror on Linux";
    else if(preg_match("/Linux/i", $ua ) && preg_match("/firefox/", $ua)) {
    $nua = "Firefox on Linux";
    else if(preg_match("/Linux/i", $ua ) && preg_match("/mozilla/", $ua)) {
    $nua = "Mozilla on Linux";
    else if(preg_match("/Linux/i", $ua ) && preg_match("/opera/", $ua)) {
    $nua = "Opera on Linux";
    else if(preg_match("/FreeBSB/i", $ua ) && preg_match("/firefox/", $ua)) {
    $nua = "Firefox on Free BSD";
    else {
    $nua = $unk_useragent;

    I’ll do more testing and report back if there’s still a problem, but I think that’s what I did wrong above.

  182. Frank Hagan responds:
    Posted: June 29th, 2011 at 9:56 am

    It seems to be working. Also, on line 849 is the email validation regular expression that also uses eregi, and is deprecated. I commented out the line using eregi, copied it and changed it to use preg_match, and it seems to be working fine. Here’s the complete ### Email formation check block of code:

    ### Email formation check

    ### else if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,6})", "$email_value")) {

    else if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,6})/", "$email_value")) {
    $bad_email = '‘.$email_label.’‘;
    $email_border = $error_border;
    $email_errlbl = $error_label;
    $user_message = ‘‘.$bademail_err.’: ‘.$bad_email.’‘.”\n”;
    $form_status = “nogo”;

    I think that works without a “/i” at the end since the regular expression includes both upper and lower case already. If someone in the know can verify it for others, that would be great.

  183. Dave responds:
    Posted: August 4th, 2011 at 9:39 pm

    I have been using your script for years without issue, LOVE IT, THANK YOU!

    But I just recently noticed the following characters appearing on the website within the form, right before the beginning of the required fields :


    I cannot find these characters within any code in any file. They also appear on the success page after a form has been submitted. Our server/site has not been hacked to my knowledge.

    Otherwise, the form works fine to my knowledge. Any ideas? Thank you!

  184. Dave responds:
    Posted: August 4th, 2011 at 10:01 pm

    So sorry, v3 for me. Also, characters appearing in all browsers.

    Thanks for any ideas on where I can start looking or in what file…

  185. Dave responds:
    Posted: August 5th, 2011 at 5:02 pm

    Thank you as always for your input and willingness to help. Now I have two sets of characters. ?

    Yeah, figured it’s a space somewhere, but I cannot find a thing. Characters still there even when I upload your unedited files. Obviously I’m missing something or where it is really coming from… your files or my .php page.

    Wondering about if a file gets messed up when publishing? Would publishing them through Expression or otherwise be the culprit, instead of ftp?

    And, if I open form, en, or other files to edit, what format should they be saved in… ansi, unicode, utf-8? I’ve had issues caused by that too in the past.

    Thanks again for any other ideas or where to look…

  186. Dave responds:
    Posted: August 6th, 2011 at 10:24 am

    Thank you again, Mike.

    Yeah, 2nd set of characters showed up in the same place when a file was published, but I don’t think it had anything to do with the “en” language file, instead, I think it happened when the form.php file was uploaded. However, when following your advice and uploading fresh files from your package numerous times over, they still appeared.

    I have now pulled every hair out of my head trying to find any hidden spaces, characters, etc. in all files used, and have failed. I am not an attractive bald man. So, I resorted to changing the meta at the top of my contact page with charset=utf-8 (previously something like windows-1252).

    That took care of the characters, they do not appear, and everything seems to work fine. But not sure how that will affect anything else as the site/page was working fine before. ? Thoughts? Thanks again!

  187. Javier responds:
    Posted: August 25th, 2011 at 4:45 pm

    I have the script (GBCF v3) working fine but when I try to send the form to multiple addresses neither address gets an email. It should be like this on the config file right?

    $send_email = “,”;

    When i use one address it works fine.

  188. Frank responds:
    Posted: September 30th, 2011 at 6:28 am

    Hi there, using V3.

    I replaced all the eregi functions, but still have an error on my email check.

    The solution Frank Hagan had, gave the following error on my script:

    Parse error: syntax error, unexpected T_STRING in /var/www/g45223/ on line 865

  189. Frank responds:
    Posted: October 3rd, 2011 at 9:37 am

    Hey Mike, thanks for your quick reply.

    It were does pesky apostrophs! I replaced them by ” & ‘ and got the form to work!

    Thanks alot!

  190. Michael Barrish responds:
    Posted: November 12th, 2011 at 3:50 pm

    Hi Mike,

    You helped me many years ago, and I’ve been using GBCF ever since!

    Today I’m having a problem with version 2. It’s the “Anti-Spam Trap 1 Field Populated” message. As per , I tried changing the $form_location variable to the contact page URL, to no avail.

    The only thing possible cause I can think of is that I’m using a site preview domain (this is at Media Temple). I actually don’t know why that would be a problem because the URL is accessible from anywhere, but it’s the only thing that seems different about this setup.

    The contact page is at


  191. Michael Barrish responds:
    Posted: November 15th, 2011 at 5:40 pm

    Mike, thanks for checking it out. In a strange way, I’m pleased to have stumped you.

    Now, I know this flies in the face of the purpose of the form, but is there a way to disable Anti-Spam Trap 1? I’m expecting you to say, no, that the traps are baked into the PHP and would be a lot of work to “unbake,” but I figured I’d ask anyway. I’m stumped too.

Sorry. Comments are closed.

Note: This is the end of the usable page. The image(s) below are preloaded for performance only.