Simple Contact form - No email!!

TeLLe

New Member
Hey all,
Please can u help me... I downloaded a simple contact form from Web4future and they claim you can put anything in the form (text boxes and so on) and it will send it with no editing... I have made sure the email address is right and i have even used my private email... but nothing... it submits and goes to my home page like i want it to be no email??? any suggestions???
Below is the code... there are 2 files...
 

TeLLe

New Member
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>KLD Rekord Supplements for 2011 - Online Booking</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style7 {color: #FFFFFF}
body {
background-color: #DBDBDB;
}
.style8 {color: #000000}
.style15 {font-family: VERdana; font-size: 12px; }
.style16 {font-size: 12px}
-->
</style>
</head>

<body>
<table width="793" border="0" align="center" cellpadding="0" cellspacing="0" id="outer">
<tr>
<td width="793" bgcolor="#FFFFFF" class="name"><div align="center" class="style15"><img src="logorekord.PNG" width="276" height="97" /></div></td>
</tr>

<tr>
<td bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td height="1" bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td height="44" bgcolor="#FFFFFF" class="heading style15 style16"><div align="center">Please complete the following form to make an online booking. </div></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" height="40"><table width="765" height="418" align="center" cellspacing="0" bordercolor="#FFFFFF">
<tr bgcolor="#CBCBCB">
<td width="20" height="21" bgcolor="#DBDBDB" class="style15">&nbsp;</td>
<td width="720" bgcolor="#DBDBDB" class="style15">&nbsp;</td>
<td width="17" bgcolor="#DBDBDB" class="style15">&nbsp;</td>
</tr>
<tr>
<td height="371" bgcolor="#DBDBDB" class="style15">&nbsp;</td>
<td bgcolor="#FFFFFF" class="style15"><form method="post" action="form2mail.php">
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
<tr>
<td><table width="715">
<tr>
<td width="201" class="style8"><div align="left">*Full Name : </div></td>
<td colspan="2" class="style8"><input name="name" id="name" style="" size="30" />
</td>
</tr>
<tr>
<td class="style8"><div align="left">*Company Name: </div></td>
<td colspan="2" class="style8"><input name="company" id="Telephone2" style="" size="30" />
</td>
</tr>
<tr>
<td class="style8">*Telephone Number: </td>
<td colspan="2" class="style8"><input name="telephone" id="telephone" style="" size="30" />
</td>
</tr>
<tr>
<td class="style8">*Cel Number:</td>
<td colspan="2" class="style8"><strong>
<input name="cel " id="Telephone3" style="" size="30" />
</strong></td>
</tr>
<tr>
<td class="style8"><div align="left">*Email Address : </div></td>
<td colspan="2" class="style8"><input name="email" id="Email2" style="" size="30" />
</td>
</tr>
<tr>
<td class="style8"><div align="left">*Supplement List: </div></td>
<td colspan="2" class="style8"><label>
<select name="supp_list">
<option selected="selected">Select</option>
<option>Local is Lekker &ndash;24 Maart 2011</option>
<option>Bruid bylae &ndash; 31 Maart 2011</option>
<option>We mean BIG Business &ndash; 21 April 2011</option>
<option>Nampo &ndash; 12 Mei 2011</option>
<option>Healthy Living &ndash; 28 Julie 2011</option>
<option>Straatfees &ndash; 1 September 2011</option>
<option>Aardklop/Local is Lekker &ndash; 29 September 2011</option>
<option>New Beginnings &ndash; 27 October 2011</option>
<option>Kersfees bylae &ndash; 24 November 2011</option>
<option>Local is Lekker &ndash; 15 December 2011</option>
</select>
</label></td>
</tr>
<tr>
<td class="style8"><div align="left">*Size Riquired</div></td>
<td colspan="2" class="style8"><select name="size_req">
<option selected="selected">Select</option>
<option>Front Page - 10x8 Columns - 10x24.8cm = R3 505.00</option>
<option>Back Page - 39x8 Columns - 39x24.8cm = R10 488.00</option>
<option>Back Page - 20x8 Columns - 20x24.8cm = R5 553.00</option>
<option>Back Page - 20x4 Columns - 20x12.5cm = R2 931.00</option>
<option>Back Page - 10x8 Columns - 10x24.8cm = R2 931.00</option>
<option>Inside - 39x8 Columns - 39x24.8cm = R9 535.00</option>
<option>Inside - 39x8 (Advertorial) Columns - 39x24.8cm = R7 628.00</option>
<option>Inside - 20x8 Columns - 20x24.8cm = R5 058.00</option>
<option>Inside - 20x8 (Advertorial) Columns - 20x24.8cm = R5 058.00</option>
<option>Inside - 20x4 Columns - 20x12.5cm = R2 664.00</option>
<option>Inside - 10x8 Columns - 10x24.8cm = R2 664.00</option>
<option>Inside - 15x3 Columns - 15x9.5cm = R1 577.00</option>
<option>Inside - 10x4 Columns - 10x12.5cm = R1 402.00</option>
<option>Inside - 10x3 Columns - 10x10cm = R1 052.00</option>
<option>Inside - 10x2 Columns - 10x6cm = R 701.00</option>
<option>Inside - 5x2 Columns - 5x6cm = R 351.00</option>
<option>Inside - 3x2 (Guest Houses) Columns - 3x26cm = R195.00</option>
</select>
</td>
</tr>
<tr>
<td height="25" class="style8"><div align="center">
<div align="left">*Account with KLD Rekord? </div>
</div></td>
<td width="197" height="25" class="style8"><select name="account">
<option selected="selected">Select</option>
<option>YES</option>
<option>NO</option>
</select>
</td>
<td width="301" class="style8"><p>If no Please create an account first by Clicking Here </p></td>
</tr>
<tr>
<td style="text-align:center"><div align="left">Comments:</div></td>
<td style="text-align:center"><div align="left">
<textarea name="textarea" cols="30" rows="5"></textarea>
</div></td>
</tr>
<tr>
<td colspan="2" style="text-align:center"><input name="submit" type="submit" value="Submit" />
</td>
</tr>
</table></td>
</tr>
</table>
</form></td>
<td bordercolor="#DBDBDB" bgcolor="#DBDBDB" class="style15"><div align="left"></div></td>
</tr>
<tr bgcolor="#CBCBCB">
<td height="24" bgcolor="#DBDBDB" class="style15">&nbsp;</td>
<td bgcolor="#DBDBDB" class="style15">&nbsp;</td>
<td bgcolor="#DBDBDB" class="style15">&nbsp;</td>
</tr>
</table>
<p class="style15">&nbsp;</p></td>
</tr>

<tr>
<td height="28" align="center" bgcolor="#FFFFFF"><p class="style15">Copyright &copy; 2011 KLD REKORD SUPPLEMENT </p>
<p class="style15">Designed by:<a href="http://www.adtitude.co.za"> Adtitude Advertising &amp; Marketing </a></p></td>
</tr>
</table>
</body>
</html>
 

TeLLe

New Member
and here is the PHP file:

<?php
# You can use this script to submit your forms or to receive orders by email.
$MailToAddress = "[email protected]"; // your email address
$redirectURL = "http://www.adtitude.co.za/kldrekord/index.htm"; // the URL of the thank you page.
$MailSubject = "KLD Rekord Supplement Online Booking"; // the subject of the email
$sendHTML = FALSE; //set to "false" to receive Plain TEXT e-mail
$serverCheck = TRUE; // if, for some reason you can't send e-mails, set this to "false"

# copyright 2006 Web4Future.com =================== READ THIS ===================================================

# If you are asking for a name and an email address in your form, you can name the input fields "name" and "email".
# If you do this, the message will apear to come from that email address and you can simply click the reply button to answer it.

# To block an IP, simply add it to the blockip.txt text file.
# CHMOD 777 the blockip.txt file (run "CHMOD 777 blockip.txt", without the double quotes)
# This is needed because the script tries to block the IP that tried to hack it

# If you have a multiple selection box or multiple checkboxes, you MUST name the multiple list box or checkbox as "name[]" instead of just "name"
# you must also add "multiple" at the end of the tag like this: <select name="myselectname[]" multiple>
# you have to do the same with checkboxes

/*****************************************************************

Web4Future Easiest Form2Mail (GPL).
Copyright (C) 1998-2006 Web4Future.com All Rights Reserved.
http://www.Web4Future.com/
This script was written by George L. & Calin S. from Web4Future.com

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

*****************************************************************/

# DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING ===================================================
$w4fver = "2.2";
$ip = ($_SERVER['HTTP_X_FORWARDED_FOR'] == "" ? $_SERVER['REMOTE_ADDR'] : $_SERVER['HTTP_X_FORWARDED_FOR']);
//function blockIP
function blockip($ip) {
$handle = @fopen("blockip.txt", 'a');
@fwrite($handle, $ip."\n");
@fclose($handle);
}
$w4fx = stristr(file_get_contents('blockip.txt'),getenv('REMOTE_ADDR'));
if ($serverCheck) {
if (preg_match ("/".str_replace("www.", "", $_SERVER["SERVER_NAME"])."/i", $_SERVER["HTTP_REFERER"])) { $w4fy = TRUE; } else { $w4fy = FALSE; }
} else { $w4fy = TRUE; }
if (($w4fy === TRUE) && ($w4fx === FALSE)) {
$w4fMessage = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html>\n<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></head><body><font face=3Dverdana size=3D2>";
if (count($_GET) >0) {
reset($_GET);
while(list($key, $val) = each($_GET)) {
$GLOBALS[$key] = $val;
if (is_array($val)) {
$w4fMessage .= "<b>$key:</b> ";
foreach ($val as $vala) {
$vala =stripslashes($vala);
$vala = htmlspecialchars($vala);
if (trim($vala)) { if (stristr($vala,"Content-Type:") || stristr($vala,"MIME-Version") || stristr($vala,"Content-Transfer-Encoding") || stristr($vala,"bcc:")) { blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }
$w4fMessage .= "$vala, ";
}
$w4fMessage .= "<br>\n";
}
else {
$val = stripslashes($val);
if (trim($val)) { if (stristr($val,"Content-Type:") || stristr($val,"MIME-Version") || stristr($val,"Content-Transfer-Encoding") || stristr($val,"bcc:")) { blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }
if (($key == "Submit") || ($key == "submit")) { }
else { if ($val == "") { $w4fMessage .= "$key: - <br>\n"; }
else { $w4fMessage .= "<b>$key:</b> $val<br>\n"; }
}
}
} // end while
}//end if
else {
reset($_POST);
while(list($key, $val) = each($_POST)) {
$GLOBALS[$key] = $val;
if (is_array($val)) {
$w4fMessage .= "<b>$key:</b> ";
foreach ($val as $vala) {
$vala =stripslashes($vala);
$vala = htmlspecialchars($vala);
if (trim($vala)) { if (stristr($vala,"Content-Type:") || stristr($vala,"MIME-Version") || stristr($vala,"Content-Transfer-Encoding") || stristr($vala,"bcc:")) {blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }
$w4fMessage .= "$vala, ";
}
$w4fMessage .= "<br>\n";
}
else {
$val = stripslashes($val);
if (trim($val)) { if (stristr($val,"Content-Type:") || stristr($val,"MIME-Version") || stristr($val,"Content-Transfer-Encoding") || stristr($val,"bcc:")) {blockip($ip); die("ILLEGAL EXECUTION DETECTED!"); } }
if (($key == "Submit") || ($key == "submit")) { }
else { if ($val == "") { $w4fMessage .= "$key: - <br>\n"; }
else { $w4fMessage .= "<b>$key:</b> $val<br>\n"; }
}
}
} // end while
}//end else
$w4fMessage .= "<font size=3D1><br><br>\n Sender IP: ".$ip."</font></font></body></html>";
$w4f_what = array("/To:/i", "/Cc:/i", "/Bcc:/i","/Content-Type:/i","/\n/");
$name = preg_replace($w4f_what, "", $name);
$email = preg_replace($w4f_what, "", $email);
if (!$email) {$email = $MailToAddress;}
$mailHeader = "From: $name <$email>\r\n";
$mailHeader .= "Reply-To: $name <$email>\r\n";
$mailHeader .= "Message-ID: <". md5(rand()."".time()) ."@". ereg_replace("www.","",$_SERVER["SERVER_NAME"]) .">\r\n";
$mailHeader .= "MIME-Version: 1.0\r\n";
if ($sendHTML) {
$mailHeader .= "Content-Type: multipart/alternative;";
$mailHeader .= " boundary=\"----=_NextPart_000_000E_01C5256B.0AEFE730\"\r\n";
}
$mailHeader .= "X-Priority: 3\r\n";
$mailHeader .= "X-Mailer: PHP/" . phpversion()."\r\n";
$mailHeader .= "X-MimeOLE: Produced By Web4Future Easiest Form2Mail $w4fver\r\n";
if ($sendHTML) {
$mailMessage = "This is a multi-part message in MIME format.\r\n\r\n";
$mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730\r\n";
$mailMessage .= "Content-Type: text/plain; charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";
$mailMessage .= trim(strip_tags($w4fMessage))."\r\n\r\n";
$mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730\r\n";
$mailMessage .= "Content-Type: text/html; charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";
$mailMessage .= "$w4fMessage\r\n\r\n";
$mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730--\r\n";
}
if ($sendHTML === FALSE) {
$mailHeader .= "Content-Type: text/plain; charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";
$mailMessage .= trim(strip_tags($w4fMessage))."\r\n\r\n";
}

if (!mail($MailToAddress, $MailSubject, $mailMessage,$mailHeader)) { echo "Error sending e-mail!";}
else { header("Location: ".$redirectURL); }
} else { echo "<center><font face=verdana size=3 color=red><b>ILLEGAL EXECUTION DETECTED!</b></font></center>";}
?>



Please please if anyone could help me i would appreciate it... i just cant figure out whats wrong... and i have been busy with it for hours now!!!
It is probably something stupid!!! I know u all will find it :)

Thanks in advance!!!
 

TeLLe

New Member
i left all the info in it so u all can see that all i did was add my own form like they say we can... on their site it says: "# What can I do with Easiest Form2Mail ?

As the name suggests, it's the easiest form you you will ever need. It can handle all form field types, including multiple selection boxes. You can have as many fields as you need, the script will still work, without you having to change anything in it.

# How do I use your script?

All you have to change in the script is your e-mail address (addresses) and the location of your thank you page and you're ready to go. You can use the script with any form...just design your own form and link it to Web4Future Easiest Form2Mail (you need to have basic HTML knowledge to design a form for your website) .

Easiest Form2Mail was written in PHP and it works best under UNIX, but it can also be used on Windows servers."
 
Top