ahishafeez Posted April 8, 2017 Share Posted April 8, 2017 (edited) Hi, I have the following code in the contact form ob my page: Sorry for pasting here, also i need to know why it is not returning any information however i am get the mail but it does not contain any information from the form just what is in the PHP file the email comes like this: Form details below. First Name: Email: orderphone: ordertopic: orderspecification: <div class="mainform"> <div class="formhead"> <strong>50% OFF!</strong> <strong>Sign Up Now</strong> <span>Limited Time Offer</span> </div> <div id="orform" class="formcontainer orderform"> <div class="off15 hidden-phone"></div> <form action="order.php" method="POST"> <p>Name</p> <input type="text" name="name" class="required cn"> <p>Email</p> <input type="text" name="email" class=" required" > <p>Country</p> <div style="position:relative"> <input type="text" id="code" class="SelectCountry small" readonly> <select class="countrylist multi valid" name="pc" style="opacity: 0;"><option value="93" data-abbr="AF" data-name="AFGHANISTAN">AFGHANISTAN (+93)</option><option value="355" data-abbr="AL" data-name="ALBANIA">ALBANIA (+355)</option><option value="213" data-abbr="DZ" data-name="ALGERIA">ALGERIA (+213)</option><option value="168" data-abbr="AS" data-name="AMERICAN SAMOA">AMERICAN SAMOA (+168)</option><option value="376" data-abbr="AD" data-name="ANDORRA">ANDORRA (+376)</option><option value="244" data-abbr="AO" data-name="ANGOLA">ANGOLA (+244)</option><option value="264" data-abbr="AI" data-name="ANGUILLA">ANGUILLA (+264)</option><option value="167" data-abbr="AQ" data-name="ANTARCTICA">ANTARCTICA (+167)</option><option value="268" data-abbr="AG" data-name="ANTIGUA AND BARBUDA">ANTIGUA AND BARBUDA (+268)</option><option value="54" data-abbr="AR" data-name="ARGENTINA">ARGENTINA (+54)</option><option value="374" data-abbr="AM" data-name="ARMENIA">ARMENIA (+374)</option><option value="297" data-abbr="AW" data-name="ARUBA">ARUBA (+297)</option><option value="61" data-abbr="AU" data-name="AUSTRALIA">AUSTRALIA (+61)</option><option value="43" data-abbr="AT" data-name="AUSTRIA">AUSTRIA (+43)</option><option value="994" data-abbr="AZ" data-name="AZERBAIJAN">AZERBAIJAN (+994)</option><option value="242" data-abbr="BS" data-name="BAHAMAS">BAHAMAS (+242)</option><option value="973" data-abbr="BH" data-name="BAHRAIN">BAHRAIN (+973)</option><option value="880" data-abbr="BD" data-name="BANGLADESH">BANGLADESH (+880)</option><option value="246" data-abbr="BB" data-name="BARBADOS">BARBADOS (+246)</option><option value="375" data-abbr="BY" data-name="BELARUS">BELARUS (+375)</option><option value="32" data-abbr="BE" data-name="BELGIUM">BELGIUM (+32)</option><option value="501" data-abbr="BZ" data-name="BELIZE">BELIZE (+501)</option><option value="229" data-abbr="BJ" data-name="BENIN">BENIN (+229)</option><option value="441" data-abbr="BM" data-name="BERMUDA">BERMUDA (+441)</option><option value="975" data-abbr="BT" data-name="BHUTAN">BHUTAN (+975)</option><option value="591" data-abbr="BO" data-name="BOLIVIA">BOLIVIA (+591)</option><option value="387" data-abbr="BA" data-name="BOSNIA AND HERZEGOVINA">BOSNIA AND HERZEGOVINA (+387)</option><option value="267" data-abbr="BW" data-name="BOTSWANA">BOTSWANA (+267)</option><option value="55" data-abbr="BR" data-name="BRAZIL">BRAZIL (+55)</option><option value="246" data-abbr="IO" data-name="BRITISH INDIAN OCEAN TERRITORY">BRITISH INDIAN OCEAN TERRITORY (+246)</option><option value="673" data-abbr="BN" data-name="BRUNEI DARUSSALAM">BRUNEI DARUSSALAM (+673)</option><option value="359" data-abbr="BG" data-name="BULGARIA">BULGARIA (+359)</option><option value="226" data-abbr="BF" data-name="BURKINA FASO">BURKINA FASO (+226)</option><option value="257" data-abbr="BI" data-name="BURUNDI">BURUNDI (+257)</option><option value="855" data-abbr="KH" data-name="CAMBODIA">CAMBODIA (+855)</option><option value="237" data-abbr="CM" data-name="CAMEROON">CAMEROON (+237)</option><option value="1" data-abbr="CA" data-name="CANADA" selected="selected">CANADA (+1)</option><option value="238" data-abbr="CV" data-name="CAPE VERDE">CAPE VERDE (+238)</option><option value="345" data-abbr="KY" data-name="CAYMAN ISLANDS">CAYMAN ISLANDS (+345)</option><option value="236" data-abbr="CF" data-name="CENTRAL AFRICAN REPUBLIC">CENTRAL AFRICAN REPUBLIC (+236)</option><option value="235" data-abbr="TD" data-name="CHAD">CHAD (+235)</option><option value="56" data-abbr="CL" data-name="CHILE">CHILE (+56)</option><option value="86" data-abbr="CN" data-name="CHINA">CHINA (+86)</option><option value="672" data-abbr="CX" data-name="CHRISTMAS ISLAND">CHRISTMAS ISLAND (+672)</option><option value="672" data-abbr="CC" data-name="COCOS (KEELING) ISLANDS">COCOS (KEELING) ISLANDS (+672)</option><option value="57" data-abbr="CO" data-name="COLOMBIA">COLOMBIA (+57)</option><option value="269" data-abbr="KM" data-name="COMOROS">COMOROS (+269)</option><option value="242" data-abbr="CG" data-name="CONGO">CONGO (+242)</option><option value="682" data-abbr="CK" data-name="COOK ISLANDS">COOK ISLANDS (+682)</option><option value="506" data-abbr="CR" data-name="COSTA RICA">COSTA RICA (+506)</option><option value="225" data-abbr="CI" data-name="COTE D'IVOIRE">COTE D'IVOIRE (+225)</option><option value="385" data-abbr="HR" data-name="CROATIA">CROATIA (+385)</option><option value="53" data-abbr="CU" data-name="CUBA">CUBA (+53)</option><option value="357" data-abbr="CY" data-name="CYPRUS">CYPRUS (+357)</option><option value="420" data-abbr="CZ" data-name="CZECH REPUBLIC">CZECH REPUBLIC (+420)</option><option value="45" data-abbr="DK" data-name="DENMARK">DENMARK (+45)</option><option value="253" data-abbr="DJ" data-name="DJIBOUTI">DJIBOUTI (+253)</option><option value="176" data-abbr="DM" data-name="DOMINICA">DOMINICA (+176)</option><option value="809" data-abbr="DO" data-name="DOMINICAN REPUBLIC">DOMINICAN REPUBLIC (+809)</option><option value="593" data-abbr="EC" data-name="ECUADOR">ECUADOR (+593)</option><option value="20" data-abbr="EG" data-name="EGYPT">EGYPT (+20)</option><option value="503" data-abbr="SV" data-name="EL SALVADOR">EL SALVADOR (+503)</option><option value="240" data-abbr="GQ" data-name="EQUATORIAL GUINEA">EQUATORIAL GUINEA (+240)</option><option value="291" data-abbr="ER" data-name="ERITREA">ERITREA (+291)</option><option value="372" data-abbr="EE" data-name="ESTONIA">ESTONIA (+372)</option><option value="251" data-abbr="ET" data-name="ETHIOPIA">ETHIOPIA (+251)</option><option value="500" data-abbr="FK" data-name="FALKLAND ISLANDS (MALVINAS)">FALKLAND ISLANDS (MALVINAS) (+500)</option><option value="298" data-abbr="FO" data-name="FAROE ISLANDS">FAROE ISLANDS (+298)</option><option value="679" data-abbr="FJ" data-name="FIJI">FIJI (+679)</option><option value="358" data-abbr="FI" data-name="FINLAND">FINLAND (+358)</option><option value="33" data-abbr="FR" data-name="FRANCE">FRANCE (+33)</option><option value="594" data-abbr="GF" data-name="FRENCH GUIANA">FRENCH GUIANA (+594)</option><option value="689" data-abbr="PF" data-name="FRENCH POLYNESIA">FRENCH POLYNESIA (+689)</option><option value="689" data-abbr="TF" data-name="FRENCH SOUTHERN TERRITORIES">FRENCH SOUTHERN TERRITORIES (+689)</option><option value="241" data-abbr="GA" data-name="GABON">GABON (+241)</option><option value="220" data-abbr="GM" data-name="GAMBIA">GAMBIA (+220)</option><option value="995" data-abbr="GE" data-name="GEORGIA">GEORGIA (+995)</option><option value="49" data-abbr="DE" data-name="GERMANY">GERMANY (+49)</option><option value="233" data-abbr="GH" data-name="GHANA">GHANA (+233)</option><option value="350" data-abbr="GI" data-name="GIBRALTAR">GIBRALTAR (+350)</option><option value="30" data-abbr="GR" data-name="GREECE">GREECE (+30)</option><option value="299" data-abbr="GL" data-name="GREENLAND">GREENLAND (+299)</option><option value="473" data-abbr="GD" data-name="GRENADA">GRENADA (+473)</option><option value="590" data-abbr="GP" data-name="GUADELOUPE">GUADELOUPE (+590)</option><option value="671" data-abbr="GU" data-name="GUAM">GUAM (+671)</option><option value="502" data-abbr="GT" data-name="GUATEMALA">GUATEMALA (+502)</option><option value="224" data-abbr="GN" data-name="GUINEA">GUINEA (+224)</option><option value="245" data-abbr="GW" data-name="GUINEA-BISSAU">GUINEA-BISSAU (+245)</option><option value="592" data-abbr="GY" data-name="GUYANA">GUYANA (+592)</option><option value="509" data-abbr="HT" data-name="HAITI">HAITI (+509)</option><option value="39" data-abbr="VA" data-name="HOLY SEE (VATICAN CITY STATE)">HOLY SEE (VATICAN CITY STATE) (+39)</option><option value="503" data-abbr="HN" data-name="HONDURAS">HONDURAS (+503)</option><option value="852" data-abbr="HK" data-name="HONG KONG">HONG KONG (+852)</option><option value="36" data-abbr="HU" data-name="HUNGARY">HUNGARY (+36)</option><option value="354" data-abbr="IS" data-name="ICELAND">ICELAND (+354)</option><option value="91" data-abbr="IN" data-name="INDIA">INDIA (+91)</option><option value="62" data-abbr="ID" data-name="INDONESIA">INDONESIA (+62)</option><option value="98" data-abbr="IR" data-name="IRAN, ISLAMIC REPUBLIC OF">IRAN, ISLAMIC REPUBLIC OF (+98)</option><option value="964" data-abbr="IQ" data-name="IRAQ">IRAQ (+964)</option><option value="353" data-abbr="IE" data-name="IRELAND">IRELAND (+353)</option><option value="972" data-abbr="IL" data-name="ISRAEL">ISRAEL (+972)</option><option value="39" data-abbr="IT" data-name="ITALY">ITALY (+39)</option><option value="876" data-abbr="JM" data-name="JAMAICA">JAMAICA (+876)</option><option value="81" data-abbr="JP" data-name="JAPAN">JAPAN (+81)</option><option value="962" data-abbr="JO" data-name="JORDAN">JORDAN (+962)</option><option value="7" data-abbr="KZ" data-name="KAZAKHSTAN">KAZAKHSTAN (+7)</option><option value="254" data-abbr="KE" data-name="KENYA">KENYA (+254)</option><option value="686" data-abbr="KI" data-name="KIRIBATI">KIRIBATI (+686)</option><option value="82" data-abbr="KP" data-name="KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF">KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF (+82)</option><option value="82" data-abbr="KR" data-name="KOREA, REPUBLIC OF">KOREA, REPUBLIC OF (+82)</option><option value="965" data-abbr="KW" data-name="KUWAIT">KUWAIT (+965)</option><option value="996" data-abbr="KG" data-name="KYRGYZSTAN">KYRGYZSTAN (+996)</option><option value="358" data-abbr="AX" data-name="LAND ISLANDS">LAND ISLANDS (+358)</option><option value="856" data-abbr="LA" data-name="LAO PEOPLE'S DEMOCRATIC REPUBLIC">LAO PEOPLE'S DEMOCRATIC REPUBLIC (+856)</option><option value="371" data-abbr="LV" data-name="LATVIA">LATVIA (+371)</option><option value="961" data-abbr="LB" data-name="LEBANON">LEBANON (+961)</option><option value="266" data-abbr="LS" data-name="LESOTHO">LESOTHO (+266)</option><option value="231" data-abbr="LR" data-name="LIBERIA">LIBERIA (+231)</option><option value="218" data-abbr="LY" data-name="LIBYAN ARAB JAMAHIRIYA">LIBYAN ARAB JAMAHIRIYA (+218)</option><option value="423" data-abbr="LI" data-name="LIECHTENSTEIN">LIECHTENSTEIN (+423)</option><option value="370" data-abbr="LT" data-name="LITHUANIA">LITHUANIA (+370)</option><option value="352" data-abbr="LU" data-name="LUXEMBOURG">LUXEMBOURG (+352)</option><option value="853" data-abbr="MO" data-name="MACAO">MACAO (+853)</option><option value="389" data-abbr="MK" data-name="MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF">MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF (+389)</option><option value="261" data-abbr="MG" data-name="MADAGASCAR">MADAGASCAR (+261)</option><option value="265" data-abbr="MW" data-name="MALAWI">MALAWI (+265)</option><option value="60" data-abbr="MY" data-name="MALAYSIA">MALAYSIA (+60)</option><option value="960" data-abbr="MV" data-name="MALDIVES">MALDIVES (+960)</option><option value="223" data-abbr="ML" data-name="MALI">MALI (+223)</option><option value="356" data-abbr="MT" data-name="MALTA">MALTA (+356)</option><option value="692" data-abbr="MH" data-name="MARSHALL ISLANDS">MARSHALL ISLANDS (+692)</option><option value="596" data-abbr="MQ" data-name="MARTINIQUE">MARTINIQUE (+596)</option><option value="222" data-abbr="MR" data-name="MAURITANIA">MAURITANIA (+222)</option><option value="230" data-abbr="MU" data-name="MAURITIUS">MAURITIUS (+230)</option><option value="269" data-abbr="YT" data-name="MAYOTTE">MAYOTTE (+269)</option><option value="52" data-abbr="MX" data-name="MEXICO">MEXICO (+52)</option><option value="691" data-abbr="FM" data-name="MICRONESIA, FEDERATED STATES OF">MICRONESIA, FEDERATED STATES OF (+691)</option><option value="373" data-abbr="MD" data-name="MOLDOVA, REPUBLIC OF">MOLDOVA, REPUBLIC OF (+373)</option><option value="377" data-abbr="MC" data-name="MONACO">MONACO (+377)</option><option value="976" data-abbr="MN" data-name="MONGOLIA">MONGOLIA (+976)</option><option value="664" data-abbr="MS" data-name="MONTSERRAT">MONTSERRAT (+664)</option><option value="212" data-abbr="MA" data-name="MOROCCO">MOROCCO (+212)</option><option value="258" data-abbr="MZ" data-name="MOZAMBIQUE">MOZAMBIQUE (+258)</option><option value="95" data-abbr="MM" data-name="MYANMAR">MYANMAR (+95)</option><option value="264" data-abbr="NA" data-name="NAMIBIA">NAMIBIA (+264)</option><option value="674" data-abbr="NR" data-name="NAURU">NAURU (+674)</option><option value="977" data-abbr="NP" data-name="NEPAL">NEPAL (+977)</option><option value="31" data-abbr="NL" data-name="NETHERLANDS">NETHERLANDS (+31)</option><option value="599" data-abbr="AN" data-name="NETHERLANDS ANTILLES">NETHERLANDS ANTILLES (+599)</option><option value="687" data-abbr="NC" data-name="NEW CALEDONIA">NEW CALEDONIA (+687)</option><option value="64" data-abbr="NZ" data-name="NEW ZEALAND">NEW ZEALAND (+64)</option><option value="505" data-abbr="NI" data-name="NICARAGUA">NICARAGUA (+505)</option><option value="227" data-abbr="NE" data-name="NIGER">NIGER (+227)</option><option value="234" data-abbr="NG" data-name="NIGERIA">NIGERIA (+234)</option><option value="683" data-abbr="NU" data-name="NIUE">NIUE (+683)</option><option value="672" data-abbr="NF" data-name="NORFOLK ISLAND">NORFOLK ISLAND (+672)</option><option value="167" data-abbr="MP" data-name="NORTHERN MARIANA ISLANDS">NORTHERN MARIANA ISLANDS (+167)</option><option value="47" data-abbr="NO" data-name="NORWAY">NORWAY (+47)</option><option value="968" data-abbr="OM" data-name="OMAN">OMAN (+968)</option><option value="92" data-abbr="PK" data-name="PAKISTAN" selected="selected">PAKISTAN (+92)</option><option value="680" data-abbr="PW" data-name="PALAU">PALAU (+680)</option><option value="970" data-abbr="PS" data-name="PALESTINIAN TERRITORY, OCCUPIED">PALESTINIAN TERRITORY, OCCUPIED (+970)</option><option value="507" data-abbr="PA" data-name="PANAMA">PANAMA (+507)</option><option value="675" data-abbr="PG" data-name="PAPUA NEW GUINEA">PAPUA NEW GUINEA (+675)</option><option value="595" data-abbr="PY" data-name="PARAGUAY">PARAGUAY (+595)</option><option value="51" data-abbr="PE" data-name="PERU">PERU (+51)</option><option value="63" data-abbr="PH" data-name="PHILIPPINES">PHILIPPINES (+63)</option><option value="672" data-abbr="PN" data-name="PITCAIRN">PITCAIRN (+672)</option><option value="48" data-abbr="PL" data-name="POLAND">POLAND (+48)</option><option value="351" data-abbr="PT" data-name="PORTUGAL">PORTUGAL (+351)</option><option value="787" data-abbr="PR" data-name="PUERTO RICO">PUERTO RICO (+787)</option><option value="974" data-abbr="QA" data-name="QATAR">QATAR (+974)</option><option value="262" data-abbr="RE" data-name="REUNION">REUNION (+262)</option><option value="40" data-abbr="RO" data-name="ROMANIA">ROMANIA (+40)</option><option value="7" data-abbr="RU" data-name="RUSSIAN FEDERATION">RUSSIAN FEDERATION (+7)</option><option value="250" data-abbr="RW" data-name="RWANDA">RWANDA (+250)</option><option value="290" data-abbr="SH" data-name="SAINT HELENA">SAINT HELENA (+290)</option><option value="186" data-abbr="KN" data-name="SAINT KITTS AND NEVIS">SAINT KITTS AND NEVIS (+186)</option><option value="175" data-abbr="LC" data-name="SAINT LUCIA">SAINT LUCIA (+175)</option><option value="508" data-abbr="PM" data-name="SAINT PIERRE AND MIQUELON">SAINT PIERRE AND MIQUELON (+508)</option><option value="180" data-abbr="VC" data-name="SAINT VINCENT AND THE GRENADINES">SAINT VINCENT AND THE GRENADINES (+180)</option><option value="885" data-abbr="WS" data-name="SAMOA">SAMOA (+885)</option><option value="378" data-abbr="SM" data-name="SAN MARINO">SAN MARINO (+378)</option><option value="239" data-abbr="ST" data-name="SAO TOME AND PRINCIPE">SAO TOME AND PRINCIPE (+239)</option><option value="966" data-abbr="SA" data-name="SAUDI ARABIA">SAUDI ARABIA (+966)</option><option value="221" data-abbr="SN" data-name="SENEGAL">SENEGAL (+221)</option><option value="381" data-abbr="CS" data-name="SERBIA AND MONTENEGRO">SERBIA AND MONTENEGRO (+381)</option><option value="248" data-abbr="SC" data-name="SEYCHELLES">SEYCHELLES (+248)</option><option value="232" data-abbr="SL" data-name="SIERRA LEONE">SIERRA LEONE (+232)</option><option value="65" data-abbr="SG" data-name="SINGAPORE">SINGAPORE (+65)</option><option value="421" data-abbr="SK" data-name="SLOVAKIA">SLOVAKIA (+421)</option><option value="386" data-abbr="SI" data-name="SLOVENIA">SLOVENIA (+386)</option><option value="677" data-abbr="SB" data-name="SOLOMON ISLANDS">SOLOMON ISLANDS (+677)</option><option value="252" data-abbr="SO" data-name="SOMALIA">SOMALIA (+252)</option><option value="27" data-abbr="ZA" data-name="SOUTH AFRICA">SOUTH AFRICA (+27)</option><option value="34" data-abbr="ES" data-name="SPAIN">SPAIN (+34)</option><option value="94" data-abbr="LK" data-name="SRI LANKA">SRI LANKA (+94)</option><option value="249" data-abbr="SD" data-name="SUDAN">SUDAN (+249)</option><option value="597" data-abbr="SR" data-name="SURINAME">SURINAME (+597)</option><option value="47" data-abbr="SJ" data-name="SVALBARD AND JAN MAYEN">SVALBARD AND JAN MAYEN (+47)</option><option value="268" data-abbr="SZ" data-name="SWAZILAND">SWAZILAND (+268)</option><option value="46" data-abbr="SE" data-name="SWEDEN">SWEDEN (+46)</option><option value="41" data-abbr="CH" data-name="SWITZERLAND">SWITZERLAND (+41)</option><option value="963" data-abbr="SY" data-name="SYRIAN ARAB REPUBLIC">SYRIAN ARAB REPUBLIC (+963)</option><option value="886" data-abbr="TW" data-name="TAIWAN, PROVINCE OF CHINA">TAIWAN, PROVINCE OF CHINA (+886)</option><option value="992" data-abbr="TJ" data-name="TAJIKISTAN">TAJIKISTAN (+992)</option><option value="255" data-abbr="TZ" data-name="TANZANIA, UNITED REPUBLIC OF">TANZANIA, UNITED REPUBLIC OF (+255)</option><option value="66" data-abbr="TH" data-name="THAILAND">THAILAND (+66)</option><option value="670" data-abbr="TL" data-name="TIMOR-LESTE">TIMOR-LESTE (+670)</option><option value="228" data-abbr="TG" data-name="TOGO">TOGO (+228)</option><option value="690" data-abbr="TK" data-name="TOKELAU">TOKELAU (+690)</option><option value="676" data-abbr="TO" data-name="TONGA">TONGA (+676)</option><option value="186" data-abbr="TT" data-name="TRINIDAD AND TOBAGO">TRINIDAD AND TOBAGO (+186)</option><option value="216" data-abbr="TN" data-name="TUNISIA">TUNISIA (+216)</option><option value="90" data-abbr="TR" data-name="TURKEY">TURKEY (+90)</option><option value="993" data-abbr="TM" data-name="TURKMENISTAN">TURKMENISTAN (+993)</option><option value="164" data-abbr="TC" data-name="TURKS AND CAICOS ISLANDS">TURKS AND CAICOS ISLANDS (+164)</option><option value="688" data-abbr="TV" data-name="TUVALU">TUVALU (+688)</option><option value="256" data-abbr="UG" data-name="UGANDA">UGANDA (+256)</option><option value="380" data-abbr="UA" data-name="UKRAINE">UKRAINE (+380)</option><option value="971" data-abbr="AE" data-name="UNITED ARAB EMIRATES">UNITED ARAB EMIRATES (+971)</option><option value="44" data-abbr="GB" data-name="UNITED KINGDOM">UNITED KINGDOM (+44)</option><option value="1" data-abbr="US" data-name="UNITED STATES" selected="selected">UNITED STATES (+1)</option><option value="598" data-abbr="UY" data-name="URUGUAY">URUGUAY (+598)</option><option value="998" data-abbr="UZ" data-name="UZBEKISTAN">UZBEKISTAN (+998)</option><option value="678" data-abbr="VU" data-name="VANUATU">VANUATU (+678)</option><option value="58" data-abbr="VE" data-name="VENEZUELA">VENEZUELA (+58)</option><option value="84" data-abbr="VN" data-name="VIETNAM">VIETNAM (+84)</option><option value="128" data-abbr="VG" data-name="VIRGIN ISLANDS, BRITISH">VIRGIN ISLANDS, BRITISH (+128)</option><option value="134" data-abbr="VI" data-name="VIRGIN ISLANDS, U.S.">VIRGIN ISLANDS, U.S. (+134)</option><option value="681" data-abbr="WF" data-name="WALLIS AND FUTUNA">WALLIS AND FUTUNA (+681)</option><option value="212" data-abbr="EH" data-name="WESTERN SAHARA">WESTERN SAHARA (+212)</option><option value="967" data-abbr="YE" data-name="YEMEN">YEMEN (+967)</option><option value="260" data-abbr="ZM" data-name="ZAMBIA">ZAMBIA (+260)</option><option value="263" data-abbr="ZW" data-name="ZIMBABWE">ZIMBABWE (+263)</option></select> <input type="text" name="pn" class="big required number" value="" placeholder="Phone Number" onKeyPress="return numbersonly(this, event)" maxlength="11" > </div> <p>Select Service</p> <select name="service" class="required"> <option value="">Select Service</option> <option value="Assignment">Assignment</option> <option value="essay">essay</option> <option value="Dissertation">Dissertation</option> <option value="Coursework">Coursework</option> <option value="Thesis">Thesis</option> <option value="other" optiongroup="Other">Other</option> </select> <input type="submit" formaction="order.php" formmethod="POST" onClick="location.href='order.php'" value=""> </form> </div> </div> and the PHP code is is as below: <?php if(isset($_POST['email'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "order@game.com"; $email_subject = "Customer information"; function died($error) { // your error code can go here echo "We are very sorry, but there were error(s) found with the form you submitted. "; echo "These errors appear below.<br /><br />"; echo $error."<br /><br />"; echo "Please go back and fix these errors.<br /><br />"; die(); } // validation expected data exists $email_message = "Form details below.\n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "First Name: ".clean_string($name)."\n"; $email_message .= "Email: ".clean_string($email)."\n"; $email_message .= "orderphone: ".clean_string($pn)."\n"; $email_message .= "ordertopic: ".clean_string($pc)."\n"; $email_message .= "orderspecification: ".clean_string($service)."\n"; // create email headers $headers = 'From: '.$email."\r\n". 'Reply-To: '.$email."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?> <!-- include your own success html here --> Thank you for contacting us. We will be in touch with you very soon.<a href="">Click Here</a> to go back to the website Now!. <?php } ?> Edited April 8, 2017 by requinix editing your post nearly crashed my chrome Quote Link to comment Share on other sites More sharing options...
requinix Posted April 8, 2017 Share Posted April 8, 2017 All those $name and $email and such variables that are coming from the form will not be created for you automatically. That's old PHP behavior. You need to get the values from $_POST yourself. Quote Link to comment Share on other sites More sharing options...
ahishafeez Posted April 8, 2017 Author Share Posted April 8, 2017 $message = .'Subject: ' .$_POST['pc']."\n" .'Instructions: ' .$_POST['service']."\n" .'Customer Name: ' .$_POST['name']."\n" .'Email: ' .$_POST['email']."\n" .'Phone Number: ' .$_POST['pn']."\n"; i tried replacing that with the following code but it did not work and i got a 404 error Quote Link to comment Share on other sites More sharing options...
requinix Posted April 8, 2017 Share Posted April 8, 2017 A 404 is something completely different and should not have happened if all you did was change that code. Is the URL correct? Quote Link to comment Share on other sites More sharing options...
ahishafeez Posted April 8, 2017 Author Share Posted April 8, 2017 i understand that is the reason i had to approach this forum as i just a newbee at PHP however have used the same code multiple times and it works perfectly but it is not showing what i want here Quote Link to comment Share on other sites More sharing options...
mlukac89 Posted April 8, 2017 Share Posted April 8, 2017 (edited) You can put on top of your php code print_r($_POST); or var_dump($_POST); and you will get all values in array from $_POST variable Btw here is how you need to check for values from form, just on submit button you add name="submit" to make this works <?php // error reporting 1 = on | 0 = off error_reporting(1); function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad, "", $string); } // if submit button is clicked if (isset($_POST['submit'])) { // all post variables from form $name = $_POST['name']; $email = $_POST['email']; $pc = (int)$_POST['pc']; $pn = $_POST['pn']; $service = $_POST['service']; // check if post variables are not empty if (empty($name) || empty($email) || empty($pc) || empty($pn) || empty($service)) { $error = "All fields are required."; } else { // validate email if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $error = "Invalid email adress."; } else { $email_to = "order@game.com"; $email_subject = "Customer information"; $email_message = "Form details below.\n\n"; $email_message .= "First Name: ".clean_string($name)."\n"; $email_message .= "Email: ".clean_string($email)."\n"; $email_message .= "orderphone: ".clean_string($pn)."\n"; $email_message .= "ordertopic: ".clean_string($pc)."\n"; $email_message .= "orderspecification: ".clean_string($service)."\n"; // create email headers $headers = 'From: '.$email."\r\n". 'Reply-To: '.$email."\r\n" . 'X-Mailer: PHP/' . phpversion(); // check if email is sent if (mail($email_to, $email_subject, $email_message, $headers)) { $error = "Email sent."; } else { $error = "Email not sent."; } } } } ?> <!-- your html code + form --> <!-- display error, put this where you want to show error --> <?php if (!empty($error)) { echo "<p>".$error."</p>"; } ?> Edited April 8, 2017 by mlukac89 Quote Link to comment Share on other sites More sharing options...
ahishafeez Posted April 8, 2017 Author Share Posted April 8, 2017 Hi, Thank you for the details but i tried and its still not going through now am not getting the emails as well, i have a separate page with the HTML on it. You can put on top of your php code print_r($_POST); or var_dump($_POST); and you will get all values in array from $_POST variable Btw here is how you need to check for values from form, just on submit button you add name="submit" to make this works <?php // error reporting 1 = on | 0 = off error_reporting(1); function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad, "", $string); } // if submit button is clicked if (isset($_POST['submit'])) { // all post variables from form $name = $_POST['name']; $email = $_POST['email']; $pc = (int)$_POST['pc']; $pn = $_POST['pn']; $service = $_POST['service']; // check if post variables are not empty if (empty($name) || empty($email) || empty($pc) || empty($pn) || empty($service)) { $error = "All fields are required."; } else { // validate email if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $error = "Invalid email adress."; } else { $email_to = "order@game.com"; $email_subject = "Customer information"; $email_message = "Form details below.\n\n"; $email_message .= "First Name: ".clean_string($name)."\n"; $email_message .= "Email: ".clean_string($email)."\n"; $email_message .= "orderphone: ".clean_string($pn)."\n"; $email_message .= "ordertopic: ".clean_string($pc)."\n"; $email_message .= "orderspecification: ".clean_string($service)."\n"; // create email headers $headers = 'From: '.$email."\r\n". 'Reply-To: '.$email."\r\n" . 'X-Mailer: PHP/' . phpversion(); // check if email is sent if (mail($email_to, $email_subject, $email_message, $headers)) { $error = "Email sent."; } else { $error = "Email not sent."; } } } } ?> <!-- your html code + form --> <!-- display error, put this where you want to show error --> <?php if (!empty($error)) { echo "<p>".$error."</p>"; } ?> Quote Link to comment Share on other sites More sharing options...
ahishafeez Posted April 8, 2017 Author Share Posted April 8, 2017 thank you everyone i managed to get it running now thank you all for your support Quote Link to comment Share on other sites More sharing options...
mlukac89 Posted April 8, 2017 Share Posted April 8, 2017 Try to use form like this, i removed few country its too must to write <form action="order.php" method="POST"> <p>Name</p> <input type="text" name="name" required="required"> <p>Email</p> <input type="text" name="email" required="required"> <p>Country</p> <div style="position:relative"> <input type="text" id="code" class="SelectCountry small" readonly> <select class="countrylist multi valid" name="pc" required="required" style="opacity: 0;"> <option value="93" data-abbr="AF" data-name="AFGHANISTAN">AFGHANISTAN (+93)</option> <option value="355" data-abbr="AL" data-name="ALBANIA">ALBANIA (+355)</option> <option value="213" data-abbr="DZ" data-name="ALGERIA">ALGERIA (+213)</option> <option value="168" data-abbr="AS" data-name="AMERICAN SAMOA">AMERICAN SAMOA (+168)</option> <option value="376" data-abbr="AD" data-name="ANDORRA">ANDORRA (+376)</option> </select> <input type="text" name="pn" class="big number" placeholder="Phone Number" onKeyPress="return numbersonly(this, event)" maxlength="11" > </div> <p>Select Service</p> <select name="service" required="required"> <option value="">Select Service</option> <option value="Assignment">Assignment</option> <option value="essay">essay</option> <option value="Dissertation">Dissertation</option> <option value="Coursework">Coursework</option> <option value="Thesis">Thesis</option> <option value="other" optiongroup="Other">Other</option> </select> <input type="submit" name="submit" value="Submit"> </form> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.