coolboyz2323
Active Member
heyy
i m receiving blank message on my email from contact form of some site.
html content:
mail.php content:
Plz help me to fix this!
THanks!
i m receiving blank message on my email from contact form of some site.
html content:
Code:
<!-- contact form start -->
<div class="contactForm" id="contactForm">
<form id="contact">
<fieldset>
<label for="contactName" id="name_label">Name (required)</label>
<input type="text" name="contactName" id="contactName" size="30" value="" class="text-input" />
<label for="contactEmail" id="email_label">Email (required)</label>
<input type="text" name="contactEmail" id="contactEmail" size="30" value="" class="text-input" />
<label for="contactSubject" id="subject_label">Subject</label>
<input type="text" name="contactSubject" id="contactSubject" size="30" value="" class="text-input" />
<label for="contactMessage" id="message_label">Message (required)</label>
<textarea name="contactMessage" id="contactMessage" class="text-input"></textarea>
<p>
<input type="submit" name="submitMessage" class="contactButton" id="contactSubmitBtn" value=""/>
</p>
</fieldset>
</form>
</div>
<!-- contact form end -->
mail.php content:
Code:
<?php
if (isset($_POST['email']))
//if "email" is filled out, send email
{
//send email
$email = $_POST['email'] ;
$name = $_POST['name'] ;
$subject = $_POST['subject'] ;
$contactMessage = $_POST['contactMessage'] ;
$header = '';
$header .= "Reply-To: $name <$email>\r\n";
$header .= "Return-Path: $name <$email>\r\n";
$header .= "From: $name <admin@cb-gfx.com>\r\n";
$header .= "Organization: CB-Graphics\r\n";
$header .= "Content-Type: text/plain\r\n";
mail("divyap_31@yahoo.com", $subject,
$contactMessage, $header);
echo "Thank you for using our mail form";
}
else
//if "email" is not filled out, display the form
{
echo "<form method='post' action='mailform.php'>
Email: <input name='email' type='text' /><br />
Subject: <input name='subject' type='text' /><br />
contactMessage:<br />
<textarea name='contactMessage' rows='15' cols='40'>
</textarea><br />
<input type='submit' />
</form>";
}
?>
Plz help me to fix this!
THanks!