form not sending any data
I finally got my form to work, although its ugly at the moment and I'll need to "pretty" it up.
So my issues is that while the form does send me the email, the email contains no data. I am new to CSS so I really appreciate any help I can get.
Here is my contact.php"
PHP Code:
<?php
$field_name = $_POST['cf_name'];
$field_email = $_POST['cf_email'];
$field_message = $_POST['cf_message'];
$mail_to = 'jeff@vegaspchelp.com';
$subject = 'Message from a site visitor '.$field_name;
$body_message = 'From: '.$field_name."\n";
$body_message .= 'E-mail: '.$field_email."\n";
$body_message .= 'Message: '.$field_message;
$headers = 'From:'.$cf_email."\r\n";
$headers .= 'Reply-To: '.$cf_email."\r\n";
$mail_status = mail ($mail_to, $subject, $body_message, $headers);
if ($mail_status) { ?>
<script language="javascript" type="text/javascript">
alert('Thank you for the message. We will contact you shortly.');
window.location = 'index-4.html';
</script>
<?php
}
else { ?>
<script language="javascript" type="text/javascript">
alert('Message failed. Please, send an email to [email]jeff@vegaspchelp.com[/email]');
window.location = 'index-4.html';
</script>
<?php
}
?>
______________________________________________________________________________________________________________________________________
Here is the html from the page that holds the form:
HTML Code:
<form action="contact.php" id="form">
<div class="container1">
<div class="tail">
<div class="h"><input name="cf_name" type="text" value="Your name" onblur="if(this.value=='') this.value='Your name' ] this.value=''" /></div>
<div class="h"><input name="cf_email" type="text" value="Your E-mail" onblur="if(this.value=='') this.value='Your E-mail' ] this.value=''" /></div>
<div class="h3">
<textarea name="cf_message" rows="40" cols="30" onblur="if (this.value=='') this.value='Message'" onfocus="if(this.value == 'Message' ) this.value=''" >Message</textarea>
</div>
</div>
<div class="container1">
<div class="fright">
<a href="#" class="link" onclick="document.getElementById('form').submit()">Send</a>
<div class="indent-2" ><a href="#" class="link" onclick="document.getElementById('form').reset()">clear</a></div>
</div>
</div>"
</div>
</form>
Trying to figure out why its not sending any data
Quote:
Originally Posted by
Crazykld69
Im a little confused about your question...
Are you wondering how to apply CSS to your form or are you asking why there isn't any message in the email?
Trying to figure out why its not sending any data