Jump to content

I need Help with PHP Captcha


Ultrakd

Recommended Posts

I have a simple contact form that I was using that I liked. But the problem was I had no form of Captcha to protect it, so I would always get spam emails. I have found numerous types of Captcha on the internet but my problem is my knowledge of PHP is minimum. So every one I find I get confused on how to put the Captcha into my form. I would really appreciate it if you guys could help me. If you guys know of a code that is better than this or if I have done somthing wrong please let me know. Here is the php sending code I am using:

 

<?php

/*Subject and Email Variables*/

   $emailSubject = 'Customer Has a Question!';
   $webMaster = 'info@geckogeeks.com';

/* Gathering Data Variables*/

   $reasonforemailField = $_POST['reasonforemail'];
   $nameField = $_POST['name'];
   $emailField = $_POST['email'];
   $questionsField = $_POST['questions'];
   $gfField = $_POST['yes'];
   $brField = $_POST['yes'];
   $searchField = $_POST['yes'];
   $breederField = $_POST['yes'];
   $otherField = $_POST['yes'];

   $body = <<


Reason for Email: $reasonforemail 

Name: $name 

Email: $email 

Questions: $questions 

Gecko Forums: $gf 

BP.net: $bp 

Search Engine: $search 

Breeder Reccomendation: $breeder 

Other: $other 

EOD;

   $headers = "From: $email\r\n";
   $headers .= "Content-type: text/html\r\n";
   $success = mail($webMaster, $emailSubject, $body, $headers);


/* Results rendard as HTML*/

   $theResults = <<
EOD;
echo "$theresults";

?>

 

Thanks Chris

Edited by Ultrakd
Link to comment
Share on other sites

Guest christoferturner

<?php include_once "header_template.php"; ?>

 

Create Your Account

Please Do First →

Add webmaster@geckogeek.com to your email white list or safe sender list now, or else you might not get the activation email that is necessary for logging in successfully.

<?php print "$errorMsg"; ?>

First Name: *

Last Name: *

 

State/Province: *

City: *

Postal / Zip Code: *

Country: *

<?php print "$country"; ?>

United States of America

Afghanistan

Albania

Algeria

American Samoa

Andorra

Angola

Anguilla

Antigua and Barbuda

Argentina

Armenia

Aruba

Australia

Austria

Azerbaijan

Bahamas

Bahrain

Bangladesh

Barbados

Belarus

Belgium

Belize

Benin

Bermuda

Bhutan

Bolivia

Bonaire

Bosnia and Herzegovina

Botswana

Brazil

British Indian Ocean Ter

Brunei

Bulgaria

Burkina Faso

Burundi

Cambodia

Cameroon

Canada

Canary Islands

Cape Verde

Cayman Islands

Central African Republic

Chad

Channel Islands

Chile

China

Christmas Island

Cocos Island

Columbia

Comoros

Congo

Cook Islands

Costa Rica

Cote D'Ivoire

Croatia

Cuba

Curacao

Cyprus

Czech Republic

Denmark

Djibouti

Dominica

Dominican Republic

East Timor

Ecuador

Egypt

El Salvador

Equatorial Guinea

Eritrea

Estonia

Ethiopia

Falkland Islands

Faroe Islands

Fiji

Finland

France

French Guiana

French Polynesia

French Southern Ter

Gabon

Gambia

Georgia

Germany

Ghana

Gibraltar

Great Britain

Greece

Greenland

Grenada

Guadeloupe

Guam

Guatemala

Guinea

Guyana

Haiti

Hawaii

Honduras

Hong Kong

Hungary

Iceland

India

Indonesia

Iran

Iraq

Ireland

Isle of Man

Israel

Italy

Jamaica

Japan

Jordan

Kazakhstan

Kenya

Kiribati

Korea North

Korea South

Kuwait

Kyrgyzstan

Laos

Latvia

Lebanon

Lesotho

Liberia

Libya

Liechtenstein

Lithuania

Luxembourg

Macau

Macedonia

Madagascar

Malaysia

Malawi

Maldives

Mali

Malta

Marshall Islands

Martinique

Mauritania

Mauritius

Mayotte

Mexico

Midway Islands

Moldova

Monaco

Mongolia

Montserrat

Morocco

Mozambique

Myanmar

Nambia

Nauru

Nepal

Netherland Antilles

Netherlands

Nevis

New Caledonia

New Zealand

Nicaragua

Niger

Nigeria

Niue

Norfolk Island

Norway

Oman

Pakistan

Palau Island

Palestine

Panama

Papua New Guinea

Paraguay

Peru

Philippines

Pitcairn Island

Poland

Portugal

Puerto Rico

Qatar

Reunion

Romania

Russia

Rwanda

St Barthelemy

St Eustatius

St Helena

St Kitts-Nevis

St Lucia

St Maarten

St Pierre and Miquelon

St Vincent and Grenadines

Saipan

Samoa

Samoa American

San Marino

Sao Tome and Principe

Saudi Arabia

Senegal

Seychelles

Serbia and Montenegro

Sierra Leone

Singapore

Slovakia

Slovenia

Solomon Islands

Somalia

South Africa

Spain

Sri Lanka

Sudan

Suriname

Swaziland

Sweden

Switzerland

Syria

Tahiti

Taiwan

Tajikistan

Tanzania

Thailand

Togo

Tokelau

Tonga

Trinidad and Tobago

Tunisia

Turkey

Turkmenistan

Turks and Caicos Is

Tuvalu

Uganda

Ukraine

United Arab Emirates

United Kingdom

United States of America

Uruguay

Uzbekistan

Vanuatu

Vatican City State

Venezuela

Vietnam

Virgin Islands Brit

Virgin Islands USA

Wake Island

Wallis and Futana Is

Yemen

Zaire

Zambia

Zimbabwe

Website:

Email Address: *

Confirm Email: *

Create Password: *

Alphanumeric Characters Only

Confirm Password: *

Alphanumeric Characters Only

 

Human Check: *

 

 

 

 

 

 

 

 

<?php include_once "right_AD_template.php"; ?>

<?php include_once "footer_template.php"; ?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...