<?
/************************
* Variables you can change
*************************/
$mailto = "[email protected]";
$cc = "";
$bcc = "";
$subject = "Email subject";
$vname = "BrightCherry enquiry";
/************************
* do not modify anything below unless you know PHP/HTML/XHTML
*************************/
$email = $_POST['email'];
function validateEmail($email)
{
if(eregi('^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,4}(\.[a-zA-Z]{2,3})?(\.[a-zA-Z]{2,3})?$', $email))
return true;
else
return false;
}
if((strlen($_POST['name']) < 1 ) || (strlen($email) < 1 ) || (strlen($_POST['message']) < 1 ) || validateEmail($email) == FALSE){
$emailerror .= '';
if(strlen($_POST['name']) < 1 ){
$emailerror .= '<li>Enter name</li>';
}
if(strlen($email) < 1 ){
$emailerror .= '<li>Enter email</li>';
}
if(validateEmail($email) == FALSE) {
$emailerror .= '<li>Enter valid email</li>';
}
if(strlen($_POST['message']) < 1 ){
$emailerror .= '<li>Enter message</li>';
}
} else {
$emailerror .= "Your email has been sent successfully";
// NOW SEND THE ENQUIRY
$timestamp = date("F j, Y, g:ia");
$messageproper ="\n\n" .
"Name: " .
ucwords($_POST['name']) .
"\n" .
"Email: " .
ucwords($email) .
"\n" .
"Website: " .
ucwords($_POST['website']) .
"\n" .
"Company: " .
ucwords($_POST['company']) .
"\n" .
"Comments: " .
$_POST['message'] .
"\n" .
"\n\n" ;
$messageproper = trim(stripslashes($messageproper));
mail($mailto, $subject, $messageproper, "From: \"$vname\" <".$_POST['e_mail'].">\nReply-To: \"".ucwords($_POST['first_name'])."\" <".$_POST['e_mail'].">\nX-Mailer: PHP/" . phpversion() );
}
?>
<div id='emailerror'>
<ul>
<? echo $emailerror; ?>
</ul>
</div>
<h2>Here you can send us a message!</h2>
<p>Random text paragraph here!</p>
<h3>General Support</h3>
<form action="submitemail.php" id="submitform" method="post">
<ul>
<li class="forminput">
<ul>
<li class="formleft">Name:</li>
<li class="formright"><input name="name" type="text"/> *</li>
</ul>
</li>
<li class="forminput">
<ul>
<li class="formleft">Email:</li>
<li class="formright"><input name="email" type="text"/> *</li>
</ul>
</li>
<li class="forminput">
<ul>
<li class="formleft">Website:</li>
<li class="formright"><input name="website" type="text"/></li>
</ul>
</li>
<li class="forminput">
<ul>
<li class="formleft">Company:</li>
<li class="formright"><input name="company" type="text"/></li>
</ul>
</li>
<li class="forminput">
<ul>
<li class="formleft">Message/Comment:</li>
<li class="formright"><textarea name="message" cols="40" rows="5"></textarea> * </li>
</ul>
</li>
<li class="forminput">
<ul>
<li class="formleft hidden">Submit</li>
<li class="formright"><input type="submit" class="button" value="Submit" /></li>
</ul>
</li>
</ul>
</form>
# Enter name'; } if(strlen($email) < 1 ){ $emailerror .= 'Enter email
# '; } if(validateEmail($email) == FALSE) { $emailerror .= 'Enter valid email
# '; } if(strlen($_POST['message']) < 1 ){ $emailerror .= 'Enter message
'; } } else { $emailerror .= "Your email has been sent successfully"; // NOW SEND THE ENQUIRY $timestamp = date("F j, Y, g:ia"); $messageproper ="\n\n" . "Name: " . ucwords($_POST['name']) . "\n" . "Email: " . ucwords($email) . "\n" . "Website: " . ucwords($_POST['website']) . "\n" . "Company: " . ucwords($_POST['company']) . "\n" . "Comments: " . $_POST['message'] . "\n" . "\n\n" ; $messageproper = trim(stripslashes($messageproper)); mail($mailto, $subject, $messageproper, "From: \"$vname\" <".$_POST['e_mail'].">\nReply-To: \"".ucwords($_POST['first_name'])."\" <".$_POST['e_mail'].">\nX-Mailer: PHP/" . phpversion() ); } ?>
death180 said:After I sent it I got htis error:
Code:# Enter name'; } if(strlen($email) < 1 ){ $emailerror .= 'Enter email # '; } if(validateEmail($email) == FALSE) { $emailerror .= 'Enter valid email # '; } if(strlen($_POST['message']) < 1 ){ $emailerror .= 'Enter message '; } } else { $emailerror .= "Your email has been sent successfully"; // NOW SEND THE ENQUIRY $timestamp = date("F j, Y, g:ia"); $messageproper ="\n\n" . "Name: " . ucwords($_POST['name']) . "\n" . "Email: " . ucwords($email) . "\n" . "Website: " . ucwords($_POST['website']) . "\n" . "Company: " . ucwords($_POST['company']) . "\n" . "Comments: " . $_POST['message'] . "\n" . "\n\n" ; $messageproper = trim(stripslashes($messageproper)); mail($mailto, $subject, $messageproper, "From: \"$vname\" <".$_POST['e_mail'].">\nReply-To: \"".ucwords($_POST['first_name'])."\" <".$_POST['e_mail'].">\nX-Mailer: PHP/" . phpversion() ); } ?>
Deprecated: Function eregi() is deprecated in C:\wamp\www\death18012\submitemail.php on line 23
Notice: Undefined variable: emailerror in C:\wamp\www\death18012\submitemail.php on line 51
Notice: Undefined index: e_mail in C:\wamp\www\death18012\submitemail.php on line 78
Notice: Undefined index: first_name in C:\wamp\www\death18012\submitemail.php on line 78
Notice: Undefined index: e_mail in C:\wamp\www\death18012\submitemail.php on line 78
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\death18012\submitemail.php on line 78
Deprecated: Function eregi() is deprecated in C:\wamp\www\death18012\submitemail.php on line 23
Notice: Undefined variable: emailerror in C:\wamp\www\death18012\submitemail.php on line 51
Notice: Undefined index: e_mail in C:\wamp\www\death18012\submitemail.php on line 78
Notice: Undefined index: first_name in C:\wamp\www\death18012\submitemail.php on line 78
Notice: Undefined index: e_mail in C:\wamp\www\death18012\submitemail.php on line 78
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\death18012\submitemail.php on line 78
Since 2007, Forum Promotion has specialized in providing advertising solutions to webmasters looking to promote their communities. We pride ourselves in being the bridge that connects forum administrators, bloggers, and more.
We use essential cookies to make this site work, and optional cookies to enhance your experience.