Skip to content

anonymous /Contact.php
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
These are the only codes i am using to create the contact form at the minute.
<?php
$field_name = $_POST['cf_name'];
$field_email = $_POST['cf_email'];
$field_message = $_POST['cf_message'];
$mail_to = 'mail@markblackler.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: '.$field_email."\r\n";
$headers .= 'Reply-To: '.$field_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. I will contact you as soon as possible.');
document.location = 'http://www.markblackler.com'
</script>
<?php
}
else { ?>
<script language="javascript" type="text/javascript">
alert('Message failed. Please, send an email to mail@markblackler.com');
document.location = 'http://www.markblackler.com'
</script>
<?php
}
?>
<div id="fifth">
<div class="scrollblock3">
<div class="contact-left">
<form action="contact.php" method="post">
<font style="background-color: black;">Your name: </font><br>
<input type="text" name="cf_name"><br>
<font style="background-color: black;">Your e-mail: </font><br>
<input type="text" name="cf_email"><br>
<font style="background-color: black;">Message: </font><br>
<textarea name="cf_message" rows="12" cols="60"></textarea><br><br>
<input type="submit" value="Send">
<input type="reset" value="Clear">
</form>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.