I have created an online form located at http://www.inspired-evolution.com/Contact.php
and the form itself works fine.
I need to do some validating on the form though, so that the fields are all required, or at least some of them. I am particularly interested in validating the email field.
I've seen some scripts that validate fields, but I am not sure how to integrate with current code.
here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<fieldset>
<legend title="additional information request">Additional Information Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.
Code: Select all
<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$message=$_POST["Message"];
$formsent=mail("webguync@gmail.com",
"There has been a disturbance in the force",
"Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number: $phone\r\n
Email Address: $email\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
I wish to request the following additional information: $Textarea");
if ($formsent) {
echo "<p> Hello,<strong> $firstname</strong>.</p>
<p> We have received your request for additional information, and will respond shortly.</p>
<p> Thanks for visiting inspired-evolution.com and have a wonderful day!</p>";
}
?>and the form itself works fine.
I need to do some validating on the form though, so that the fields are all required, or at least some of them. I am particularly interested in validating the email field.
I've seen some scripts that validate fields, but I am not sure how to integrate with current code.
here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<fieldset>
<legend title="additional information request">Additional Information Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.
Code: Select all
<?php
$name=$_POSTї"e;firstname"e;];
$name=$_POSTї"e;lastname"e;];
$company=$_POSTї"e;company"e;];
$phone=$_POSTї"e;phone"e;];
$email=$_POSTї"e;email"e;];
$URL=$_POSTї"e;URL"e;];
$Contact_Preference=$_POSTї"e;Contact_Preference"e;];
$message=$_POSTї"e;Message"e;];
$formsent=mail("e;webguync@gmail.com"e;,
"e;There has been a disturbance in the force"e;,
"e;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number: $phone\r\n
Email Address: $email\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
I wish to request the following additional information: $Textarea"e;);
if ($formsent) {
echo "e;<p> Hello,<strong> $firstname</strong>.</p>
<p> We have received your request for additional information, and will respond shortly.</p>
<p> Thact.php
and the form itself works fine.
I need to do some validating on the form though, so that the fields are all required, or at least some of them. I am particularly interested in validating the email field.
I've seen some scripts that validate fields, but I am not sure how to integrate with current code.
here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<fieldset>
<legend title="additional information request">Additional Information Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.Code: Select all
<?php
$name=$_POSTї"e;firstname"e;];
$name=$_POSTї"e;lastname"e;];
$company=$_POSTї"e;company"e;];
$phone=$_POSTї"e;phone"e;];
$email=$_POSTї"e;email"e;];
$URL=$_POSTї"e;URL"e;];
$Contact_Preference=$_POSTї"e;Contact_Preference"e;];
$message=$_POSTї"e;Message"e;];
$formsent=mail("e;webguync@gmail.com"e;,
"e;There has been a disturbance in the force"e;,
"e;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number: $phone\r\n
Email Address: $email\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
I wish to request the following additional information: $Textarea"e;);
if ($formsent) {
echo "e;<p> Hello,<strong> $firstname</strong>.</p>
<p> We have received your request for addto do some validating on the form though, so that the fields are all required, or at least some of them. I am particularly interested in validating the email field.
I've seen some scripts that validate fields, but I am not sure how to integrate with current code.
here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<fieldset>
<legend title="additional information request">Additional Information Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.Code: Select all
<?php
$name=$_POSTї"e;firstname"e;];
$name=$_POSTї"e;lastname"e;];
$company=$_POSTї"e;company"e;];
$phone=$_POSTї"e;phone"e;];
$email=$_POSTї"e;email"e;];
$URL=$_POSTї"e;URL"e;];
$Contact_Preference=$_POSTї"e;Contact_Preference"e;];
$message=$_POSTї"e;Message"e;];
$formsent=mail("e;webguync@gmail.com"e;,
"e;There has been a disturbance in the force"e;,
"e;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number: $phone\r\n
Email Address: $email\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
I wish to request the following additional information: $Textarea"e;);
if ($formsent) {
echo "e;<p> Hello,<strong> $firstname</strong>.</p>
<p> We have received your request for additional information, and will respond shortrks fine.
I need to do some validating on the form though, so that the fields are all required, or at least some of them. I am particularly interested in validating the email field.
I've seen some scripts that validate fields, but I am not sure how to integrate with current code.
here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<fieldset>
<legend title="additional information request">Additional Information Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.Code: Select all
<?php
$name=$_POSTї"e;firstname"e;];
$name=$_POSTї"e;lastname"e;];
$company=$_POSTї"e;company"e;];
$phone=$_POSTї"e;phone"e;];
$email=$_POSTї"e;email"e;];
$URL=$_POSTї"e;URL"e;];
$Contact_Preference=$_POSTї"e;Contact_Preference"e;];
$message=$_POSTї"e;Message"e;];
$formsent=mail("e;webguync@gmail.com"e;,
"e;There has been a disturbance in the force"e;,
"e;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number: $phone\r\n
Email Address: $email\r\n
URL: reated an online form located at http://www.inspired-evolution.com/Contact.php
and the form itself works fine.
I need to do some validating on the form though, so that the fields are all required, or at least some of them. I am particularly interested in validating the email field.
I've seen some scripts that validate fields, but I am not sure how to integrate with current code.
here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<fieldset>
<legend title="additional information request">Additional Information Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.Code: Select all
<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$message=$_POST["Message"];
$formsent=mail("webguync@gmail.com",
"There has been a disturbance in the force",
"Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number: $phone\r\n
Email Address: $email\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
I wish to request the following additional information: $Textarea");
if ($formsent) {
echo "<p> Hello,<strong> $firstname</strong>.</p>
<p> We have received your request for additional information, and will respond shortly.</p>
<p> Thanks for visiting inspired-evolution.com and have a wonderful day!</p>";
}
?>
[/php:1:c9reated an online form located at http://www.inspired-evolution.com/Contact.php
and the form itself works fine.
I need to do some validating on the form though, so that the fields are all required, or at least some of them. I am particularly interested in validating the email field.
I've seen some scripts that validate fields, but I am not sure how to integrate with current code.
here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<fieldset>
<legend title="additional information request">Additional Information Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.Code: Select all
<?php
$name=$_POSTї"e;firstname"e;];
$name=$_POSTї"e;lastname"e;];
$company=$_POSTї"e;company"e;];
$phone=$_POSTї"e;phone"e;];
$email=$_POSTї"e;email"e;];
$URL=$_POSTї"e;URL"e;];
$Contact_Preference=$_POSTї"e;Contact_Preference"e;];
$message=$_POSTї"e;Message"e;];
$formsent=mail(&amrmation Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.Code: Select all
<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$message=$_POST["input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.Code: Select all
<?php
$name=$_POSTї"e;firstname"e;];
$name=$_POSTї"e;lastname"e;];
$company=$_POSTї"e;compatact.php
and the form itself works fine.
I need to do some validating on the form though, so that the fields are all required, or at least some of them. I am particularly interested in validating the email field.
I've seen some scripts that validate fields, but I am not sure how to integrate with current code.
here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<fieldset>
<legend title="additional information request">Additional Information Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.Code: Select all
<?php
$name=$_POSTї"e;firstname"e;];
$name=$_POSTї"e;lastname"e;];
$company=$_POSTї"e;company"e;];
$phone=$_POSTї"e;phone"e;];
$email=$_POSTї"e;email"e;];
$URL=$_POSTї"e;URL"e;];
$Contact_Preference=$_POSTї"e;Contact_Preference"e;];
$message=$_POSTї"e;Message"e;];
$formsent=mail("e;webguync@gmail.com"e;,
"e;There has been a disturbance in the force"e;,
"e;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number: $phone\r\n
Email Am itself works fine.
I need to do some validating on the form though, so that the fields are all required, or at least some of them. I am particularly interested in validating the email field.
I've seen some scripts that validate fields, but I am not sure how to integrate with current code.
here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<fieldset>
<legend title="additional information request">Additional Information Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.Code: Select all
<?php
$name=$_POSTї"e;firstname"e;];
$name=$_POSTї"e;lastname"e;];
$company=$_POSTї"e;company"e;];
$phone=$_POSTї"e;phone"e;];
$email=$_POSTї"e;email"e;];
$URL=$_POSTї"e;URL"e;];
$Contact_Preference=$_POSTї"e;Contact_Preference"e;];
$message=$_POSTї"e;Message"e;];
$formsent=mail("e;webguync@gmail.com"e;,
"e;There has been a disturbance in the force"e;,
"e;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number: $phone\r\n
Email Address: $email\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
I wish to request the following additional information: $Textarea"e;);
if ($formsent) {
echo "e;<p> Hello,<strong>/www.inspired-evolution.com/Contact.php
and the form itself works fine.
I need to do some validating on the form though, so that the fields are all required, or at least some of them. I am particularly interested in validating the email field.
I've seen some scripts that validate fields, but I am not sure how to integrate with current code.
here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<fieldset>
<legend title="additional information request">Additional Information Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.Code: Select all
<?php
$name=$_POSTї"e;firstname"e;];
$name=$_POSTї"e;lastname"e;];
$company=$_POSTї"e;company"e;];
$phone=$_POSTї"e;phone"e;];
$email=$_POSTї"e;email"e;];
$URL=$_POSTї"e;URL"e;];
$Contact_Preference=$_POSTї"e;Contact_Preference"e;];
$message=$_POSTї"e;Message"e;];
$forl required, or at least some of them. I am particularly interested in validating the email field.
I've seen some scripts that validate fields, but I am not sure how to integrate with current code.
here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<fieldset>
<legend title="additional information request">Additional Information Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.Code: Select all
<?php
$name=$_POSTї"e;firstname"e;];
$name=$_POSTї"e;lastname"e;];
$company=$_POSTї"e;company"e;];
$phone=$_POSTї"e;phone"e;];
$email=$_POSTї"e;email"e;];
$URL=$_POSTї"e;URL"e;];
$Contact_Preference=$_POSTї"e;Contact_Preference"e;];
$message=$_POSTї"e;Message"e;];
$formsent=mail("e;webguync@gmail.com"e;,
"e;There has been a disturbance in the force"e;,
"e;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number: $phone\r\n
Email Address: $email\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
I wish to request the following additional information: $Textarea"e;);
if ($formsent) {
echo "e;<p> Hello,<strong> $firstname</strong>.</p>
<p> We have received your request for additional information, and will respond shortly.</p>
<p> Thanks for visiting inspired-evolution.com and have a wonderful day!</p>"e;;
}
?&how to integrate with current code.
here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<fieldset>
<legend title="additional information request">Additional Information Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.Code: Select all
<?php
$name=$_POSTї"e;firstname"e;];
$name=$_POSTї"e;lastname"e;];
$company=$_POSTї"e;company"e;];
$phone=$_POSTї"e;phone"e;];
$email=$_POSTї"e;email"e;];
$URL=$_POSTї"e;URL"e;];
$Contact_Preference=$_POSTї"e;Contact_Preference"e;];
$message=$_POSTї"e;Message"e;];
$formsent=mailine form located at http://www.inspired-evolution.com/Contact.php
and the form itself works fine.
I need to do some validating on the form though, so that the fields are all required, or at least some of them. I am particularly interested in validating the email field.
I've seen some scripts that validate fields, but I am not sure how to integrate with current code.
here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<fieldset>
<legend title="additional information request">Additional Information Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.Code: Select all
&aested in validating the email field.
I've seen some scripts that validate fields, but I am not sure how to integrate with current code.
here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<fieldset>
<legend title="additional information request">Additional Information Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.Code: Select all
<?php
$name=$_POSTї"e;firstname"e;];
$name=$_POSTї"e;lastname"e;];
$company=$_POSTї"e;company"e;];
$phone=$_POSTї"e;phone"e;];
$email=$_POSTї"e;email"e;];
$URL=$_POSTї"e;URL"e;];
$Contact_Preference=$_POSTї"e;Contact_Preference"e;];
$message=$_POSTї"e;Message"e;];
$formsent=mail("e;webguync@gmail.com"e;,
"e;There has been a disturbance in the force"e;,
"e;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number: $phone\r\n
Email Address: $email\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
I wish to request the following additional information: $Textarea"e;);
if ($formsent) {
echo "e;<p> Hello,<strong> $firstname</strong>.</p>
<p> We have received your request for additional information, and will respond shortly.</p>
<p> Thanks for visiting inspired-evolution.com and have a wonderful day!</p>"e;;
}
?>here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<fieldset>
<legend title="additional information request">Additional Information Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.
Code: Select all
<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$message=$_POST["Message"];
$formsent=mail("webguync@gmail.com",
"There has been a disturbance in the force",
"Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number: $phone\r\n
Email Address: $email\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
I wish to request the following additional information: $Textarea");
if ($formsent) {
echo "<p> Hello,<strong> $firstname</strong>.</p>
<p> We have received your request for additional information, and will respond shortly.</p>
<p> Thanks for visiting inspired-evolution.com and have a wonderful day!</p>";
}
?><td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
&amor at least some of them. I am particularly interested in validating the email field.
I've seen some scripts that validate fields, but I am not sure how to integrate with current code.
here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<fieldset>
<legend title="additional information request">Additional Information Request</legend>
<table id="info_request">
<tr>
<td>
<label for="firstname">First Name:</label></td>
<td>
<input id="firstname" type="text" name="firstname" /> </td>
</tr>
<tr>
<td>
<label for="lastname">Last Name:</label></td>
<td>
<input id="lastname" type="text" name="lastname" /> </td>
</tr>
<tr>
<td>
<label for="company"> Company:</label></td>
<td>
<input id="company" type="text" name="company" /> </td>
</tr>
<tr>
<td>
<label for="phone"> Phone:</label></td>
<td>
<input id="phone" type="text" name="phone" /></td>
</tr>
<tr>
<td>
<label for="email"> e-mail:</label></td>
<td>
<input id="email" type="text" name="email" /> </td>
</tr>
<tr>
<td>
<label for="URL">URL:</label></td>
<td>
<input id="URL" type="text" name="URL" /> </td>
</tr>
<tr>
<td>
<label for="Contact_Preference">Best way to reach:</label></td>
<td>
<input id="Contact_Preference" type="text" name="Contact_Preference" /> </td>
</tr>
<tr>
<td valign="top">
<label for="message" id="message">message:</label></td>
<td>
<textarea name="Textarea" rows="25" cols="50"></textarea>
<input class="submit" src="/images/submit.gif" alt="Submit" type="image" name="submit" />
</td>
</tr>
</table>
</fieldset>
</form>
and PHP submission code.
Code: Select all
<?php
$name=$_POSTї"e;firstname"e;];
$name=$_POSTї"e;lastname"e;];
$company=$_POSTї"e;company"e;];
$phone=$_POSTї"e;phone"e;];
$email=$_POSTї"e;email"e;];
$URL=$_POSTї"e;URL"e;];
$Contact_Preference=$_POSTї"e;Contact_Preference"e;];
$message=$_POSTї"e;Message"e;];
$formsent=mail("e;webguync@gmail.com"e;,
"e;There has been a disturbance in the force"e;,
"e;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number: $phone\r\n
Email Address: $email\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
I wish to request the following additional information: $Textarea"e;);
if ($formsent) {
echo "e;<p> Hello,<strong> $firstname</strong>.</p>
<p> We have received your request for additional information, and will respond shortly.</p>
<p> Thaail field.
I've seen some scripts that validate fields, but I am not sure how to integrate with current code.
here is current code:
html form:
form method="post" action="Thankyou.php" class="info_request">
<field