Skip to content

Instantly share code, notes, and snippets.

@JGallardo
Created December 1, 2012 03:15
Show Gist options
  • Save JGallardo/4180389 to your computer and use it in GitHub Desktop.
Save JGallardo/4180389 to your computer and use it in GitHub Desktop.
action triggered by send
<!-- testing this below-->
<!--form -->
<form action="send.php" class="form-horizontal" method="post" name="contact_form">
<div class="control-group">
<label>NAME<span class="required">*</span></label>
<input type="text" name="name" id="name" value="" class="input-xlarge requiredField" />
</div>
<div class="control-group">
<label>EMAIL<span class="required">*</span></label>
<input type="text" name="email" id="email" value="" class="input-xlarge requiredField email" />
</div>
<div class="control-group">
<label>MESSAGE</label>
<textarea rows="6" name="message" id="message"></textarea>
</div>
<div class="control-group2">
<input name="submitted" id="submitted" value="Send" class="submit btn btn-medium btn-danger"
type="submit" />
</div>
</form>
<!-- CONTACT FORM ENDS -->
<script type="text/javascript">
//<![CDATA[
$(document).ready(function ()
{
$("#form").validate();
});
});
//]]>
</script>
<!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" />
</head>
<body>
<?php
$to = "[email protected]";
$name = $_POST["name"];
$email = $_POST["email"];
$phone = $_POST["phone"];
$url = $_POST["url"];
$message = $_POST["message"];
$text = "NAME: $name<br>
EMAIL: $email<br>
URL: $url<br>
MESSAGE: $message";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html; charset=utf-8" . "\r\n";
$headers .= "From: <$email>" . "\r\n";
mail($to, "Message", $text, $headers);
?>
</body>
</html>
<form action="send.php" class="form-horizontal" method="post" name="contact_form">
<fieldset>
<div class='control-group'>
<label class='control-label' for='name'>Name</label>
<div class='controls'>
<input class='input-xlarge' id='name' type='text' />
</div>
</div>
<div class='control-group'>
<label class='control-label' for='email'>Email</label>
<div class='controls'>
<input class='input-xlarge' id='email' type='text' />
</div>
</div>
<div class='control-group'>
<label class='control-label' for='message'>Message</label>
<div class='controls'>
<textarea class='input-xlarge' id='message' rows='3'></textarea>
</div>
</div>
<div class='control-group'>
<div class='controls'>
<input name="submitted" id="submitted" value="Send" class='btn btn-primary' type="submit" />
</div>
</div>
</fieldset>
</form>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function ()
{
$("#form").validate();
});
});
//]]>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment