Code: Select all
<!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=utf-8" />
<title>Untitled Document</title>
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" name="form1" method="post" action="http://www.startlogic.com/scripts/formemail.bml">
<table width="200" border="1" align="center">
<tr>
<td>Conversations 10 points:</td>
<td><span id="Conversations">
<label>
<input name="conversations" type="text" id="conversations" value="0" size="3" maxlength="3" />
</label>
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
</tr>
<tr>
<td>Email Address:</td>
<td><span id="emailaddress">
<label>
<input type="text" name=["$emailtest"] id=["$emailtest"] />
</label>
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
</tr>
<tr>
<td>Recruits 100 points:</td>
<td><span id="Recruits">
<label>
<input name="recruits" type="text" id="recruits" value="0" size="3" maxlength="3" />
</label>
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
</tr>
<tr>
<td> </td>
<td><label>
<input type="submit" name="submit" id="submit" value="Submit" />
</label></td>
</tr>
</table>
<p> </p>
<p> </p>
<?php
//Check whether the submission is made
if(isset($hidSubmit)){
//Declarate the necessary variables
$mail_to=$txtEmailto; $txtEmailto='$emailtest';
$mail_from=$txtEmailfrm; $txtEmailfrm='deniseadkins83@gmail.com';
$mail_sub=$txtSub; $txtSub='Test';
$mail_mesg=$txtMsg; $txtMsg='this is a test and is only a test of my sweet php ability';
//Check for success/failure of delivery
if(mail($mail_to,$mail_sub,$mail_mesg,"From:$mail_from/r/nReply-to:$mail_from"))
echo "<span class='red'>E-mail has been sent successfully from $mail_sub to $mail_to</span>";
else
echo "<span class='red'>Failed to send the E-mail from $mail_sub to $mail_to</span>";
}
?>
<input name="thankyou_url" type="hidden" id="thankyou_url" value="http://www.spartanwisdom.com" />
</form>
<script type="text/javascript">
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("Recruits", "integer");
var sprytextfield2 = new Spry.Widget.ValidationTextField("Conversations", "integer");
var sprytextfield3 = new Spry.Widget.ValidationTextField("emailaddress", "email");
//-->
</script>
</body>
</html>