need assistance with form validation

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bruceg
Forum Contributor
Posts: 174
Joined: Wed Mar 16, 2005 11:07 am
Location: Morrisville, NC
Contact:

need assistance with form validation

Post by bruceg »

Hello,

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>";

}
?>
any guidance/assistance is greatly appreciated!t 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

&lt;?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;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&quote;);
if ($formsent) {
  echo &quote;&lt;p&gt; Hello,&lt;strong&gt; $firstname&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt; We have received your request for additional information, and will respond shortly.&lt;/p&gt;
&lt;p&gt; 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

&lt;?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;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&quote;);
if ($formsent) {
  echo &quote;&lt;p&gt; Hello,&lt;strong&gt; $firstname&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt; 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

&lt;?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;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&quote;);
if ($formsent) {
  echo &quote;&lt;p&gt; Hello,&lt;strong&gt; $firstname&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt; 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

&lt;?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;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

&lt;?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

$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

&lt;?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;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

&lt;?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;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

&lt;?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;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&quote;);
if ($formsent) {
  echo &quote;&lt;p&gt; Hello,&lt;strong&gt/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

&lt;?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

$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

&lt;?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;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&quote;);
if ($formsent) {
  echo &quote;&lt;p&gt; Hello,&lt;strong&gt; $firstname&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt; We have received your request for additional information, and will respond shortly.&lt;/p&gt;
&lt;p&gt; Thanks for visiting inspired-evolution.com and have a wonderful day!&lt;/p&gt;&quote;;

}
?&amphow 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

&lt;?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

$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

&lt;?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;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&quote;);
if ($formsent) {
  echo &quote;&lt;p&gt; Hello,&lt;strong&gt; $firstname&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt; We have received your request for additional information, and will respond shortly.&lt;/p&gt;
&lt;p&gt; Thanks for visiting inspired-evolution.com and have a wonderful day!&lt;/p&gt;&quote;;

}
?&gt;
any guidance/assistance rrent 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>";

}
?>
any guidance/assistance is greatly appreciated!</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>
&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

&lt;?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;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&quote;);
if ($formsent) {
  echo &quote;&lt;p&gt; Hello,&lt;strong&gt; $firstname&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt; We have received your request for additional information, and will respond shortly.&lt;/p&gt;
&lt;p&gt; 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
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

Jim_Bo
Forum Contributor
Posts: 390
Joined: Sat Oct 02, 2004 3:04 pm

Post by Jim_Bo »

Hi,

You could just use:

Code: Select all

if ((!$name) || (!$Contact_Preference)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hthf ((!$name) || (!$Contact_Preference)) {

echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>I
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'inclust use:

Code: Select all

if ((!$name) || (!$Contact_Preference)) {
	
echo '&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;br&gt;';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote; .&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {

echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;br&gt;';

include 'include/contact.php'; 

return;

ust use:

Code: Select all

if ((!$name) || (!$Contact_Preference)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hthenter><br>';

include 'include/contact.php';

return;

}

Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hthe; ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php';

return;

}

to validate the email field.

hth{

echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi(&quo;center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-]&#1me) || (!$Contact_Preference)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center&gequired to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote; .&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {

echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;br&gt;';

include 'include/contact.t hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)php]if ((!$name) || (!$Contact_Preference)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

htht;br>';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate ail" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hthgi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php';

return;

}

to validate the email field.

hthontinue.</center><br>';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Inlude 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+&dresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

ust use:

Code: Select all

if ((!$name) || (!$Contact_Preference)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@&q6d0800fd9f]if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hth]if ((!$name) || (!$Contact_Preference)) {

echo '<center><b>Error!</b> Fields marked * are required to continue.</center&gt;&lt;br&gt;';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

lds marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hth9f]if ((!$name) || (!$Contact_Preference)) {

echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$&quotenter><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi( to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'includef (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*&amo wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@&quotemp;lt;center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hthp]if ((!$name) || (!$Contact_Preference)) {

echo '<center><b>Error!</b> Fields marked * are required to continue.&lt;/center&gt;&lt;br&gt;';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hthto make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregiust use:

Code: Select all

if ((!$name) || (!$Contact_Preference)) {
	
echo '<center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.phpred to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" .&quotontact_Preference)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

ht;gt; Fields marked * are required to continue.&lt;/center&gt;&lt;br&gt;';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hthust use:

Code: Select all

if ((!$name) || (!$Contact_Preference)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</ce marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" .&q</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echoamp;lt;/center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.phsure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hthamp;gt; Fields marked * are required to continue.</center><br>';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hthust use:

Code: Select all

if ((!$name) || (!$Contact_Preference)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to valence)) {

echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][0fd9f]if ((!$name) || (!$Contact_Preference)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hth0fd9f]if (($email) != ($c_email)) {

echo '<center><b>Error!</b> Email addresses dont match.</center>&lt;br&gt;';

include 'include/contact.php';

return;

}

Use something like:

Code: Select all

if (!eregi(&quotlt;/b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email adp;gt;<b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hth]if ((!$name) || (!$Contact_Preference)) {

echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

[php:1mp;amp;gt; Fields marked * are required to continue.&lt;/center&gt;&lt;br>';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Email addresses dont match.&lt;/center&gt;&lt;br&gt;';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center&go '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hth

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center>&lt;b&gt;Error!&lt;/b&gt; Email addresses dont match.&lt;/center&gt;&lt;br&gt;';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@".t;b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" p;gt; Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email fieldamp;lt;center><b>Error!</b> Fields marked * are required to continue.</center&gt;&lt;br&gt;';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br&a;amp;gt;<b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
ference)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+) || (!$Contact_Preference)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

e;amp;lt;center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
ields marked * are required to continue.</center><br>';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote; .&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {

echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;bmake sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center&gt;&lt;br&gt;';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hthference)) {

echo '<center><b>Error!</b> Fields marked * are required to continue.</center&gt;&lt;br&gt;';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

iContact_Preference)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hth

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if ((!$name) || (!$Contact_Preference)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to vmp;amp;lt;br>';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+&quote$name) || (!$Contact_Preference)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@&qureference)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.&#11center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$&qe/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center>&ae) || (!$Contact_Preference)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center&ae)) {
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Usp;amp;gt; Fields marked * are required to continue.</center><br>';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hthp;amp;lt;/b> Fields marked * are required to continue.</center><br>';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+(&#1111d0800fd9f]

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hthError!</b> Fields marked * are required to continue.</center><br>';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if 
	
echo '<center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered&agt; Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hth]if ((!$name) || (!$Contact_Preference)) {

echo '<center><b>Error!</b> Fields marked * are required to continue.&lt;/center&gt;&lt;br&gt;';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<centep;amp;lt;center><b>Error!</b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hth(!$Contact_Preference)) {

echo '<center><b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center><br&gt;';

include 'include/contact.php';

return;

}

also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

ilt;/b> Fields marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@&elds marked * are required to continue.</center><br>';
	
include 'include/contact.php';

return;

}
also wouldnt hurt to add "Retype Email" to make sure they get it right:

Code: Select all

if (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+".&amif (($email) != ($c_email)) {
 
echo '<center><b>Error!</b> Email addresses dont match.</center><br>';

include 'include/contact.php'; 
	
return;

}
Use something like:

Code: Select all

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {

echo '<center>Invalid email address entered</center><br>';

include 'include/contact.php'; 

return;

}
to validate the email field.

hth
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Your form validation would go in right after you import $_POST vars into variables. There you can check any number of conditions, and only send the email if those conditions are met. If they aren't, output an error message.

In other news...
Burrito wrote:viewtopic.php?t=34883
Burrito wrote:If I don't include Shocked in your topic, your lunch is free!
Do I get lunch if I call you on it?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

pickle:

unfortunately no, this wasn't your topic, however if the author of the topic had called me on it :P....


8O <-- safe now
bruceg
Forum Contributor
Posts: 174
Joined: Wed Mar 16, 2005 11:07 am
Location: Morrisville, NC
Contact:

still needing help with form validation

Post by bruceg »

Hey Guys,

I am still having some problems with this form.

http://www.inspired-evolution.com/Contact.php

the fields marked with a red asterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p></br>';    include 'include/contact.php'; return; }

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
echo '<p>Invalid email address entered</p></br>'; include
'include/contact.php';  return; }

$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
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\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>";

}
?>
I'm afraid I am going to need someone to walk me through the process of validating each field, or link me to a good tutorial on this.

thanks! this form.

http://www.inspired-evolution.com/Contact.php

the fields marked with a red asterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

&lt;?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$email2=$_POST&#1111;&quote;email2&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$Contact_Time=$_POST&#1111;&quote;Contact_Time&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'&lt;p&gt;&lt;strong&gt;Error!&lt;/strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number:  $phone\r\n
Email Address: $email\r\n
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\r\n
I wish to request the following additional information: $Textarea&quote;);
if ($formsent) {
  echo &quote;&lt;p&gt; Hello,&lt;strong&gt; $firstname&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt; We have received your request for additional information, and will respond shortly.&lt;/p&gt;
&lt;p&gt; Thanks for visiting inspired-evolution.com and have a wonderful day!&lt;/p&gt;&tion.com/Contact.php

the fields marked with a red asterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$email2=$_POST&#1111;&quote;email2&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$Contact_Time=$_POST&#1111;&quote;Contact_Time&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'&lt;p&gt;&lt;strong&gt;Error!&lt;/strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number:  $phone\r\n
Email Address: $email\r\n
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\r\n
I wish to request the following additional information: $Textarea&quote;);
if ($formsent) {
  echo &quote;&lt;p&gt; Hello,&lt;strong&gt; $firstname&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt; We have received your request for additional information, and will respond shortly.&lt;/p&gt;
&lt;p&gasterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

&lt;?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$email2=$_POST&#1111;&quote;email2&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$Contact_Time=$_POST&#1111;&quote;Contact_Time&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'&lt;p&gt;&lt;strong&gt;Error!&lt;/strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number:  $phone\r\n
Email Address: $email\r\n
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\r\n
I wish to request the following additional information: $Textarea&quote;);
if ($formsent) {
  echo &quote;&lt;p&gt; Hello,&lt;strong&gt; $firstname&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt; We have received your request for additional information, and will respond shortly.&lt;/p&gt;
&lt;p&gt; Thanks for visiting inspired-evolution.cs marked with a red asterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email&quote;];
$email2=$_POST&#1111;&quote;email2&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$Contact_Time=$_POST&#1111;&quote;Contact_Time&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'&lt;p&gt;&lt;strong&gt;Error!&lt;/strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number:  $phone\r\n
Email Address: $email\r\n
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\r\n
I wish to request the following additiostill having some problems with this form.

http://www.inspired-evolution.com/Contact.php

the fields marked with a red asterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p></br>';    include 'include/contact.php'; return; }

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
echo '<p>Invalid email address entered</p></br>'; include
'include/contact.php';  return; }

$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
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\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>";

}
?>
I'm afraid I am going to need someone to walk me through the process of validating estill having some problems with this form.

http://www.inspired-evolution.com/Contact.php

the fields marked with a red asterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p></br>';    include 'include/contact.php'; return; }

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
echo '<p>Invalid email address entered</p></br>'; include
'include/contact.php';  return; }

$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"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p></br>';    include 'include/contact.php'; return; }

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
echo '<p>Invalid email address entered</p></br>'; include
'include/contact.php';  return; }

$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
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\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>";

}
?>
I'm afraid I am going to need someone to walk me through the process of validating each field, or link me to a good tutorial on this.

thanks!quote;];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p></br>';    include 'include/contact.php'; return; }

if (!eregi("^їa-z0-9]+(ї_\\.-]їa-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(їa-z0-9]+(ї\.-]їa-z0-9]+)*)+&quote;.&quote;\\.їa-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid emailution.com/Contact.php

the fields marked with a red asterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$Contact_Time=$_POST&#1111;&quote;Contact_Time&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'&lt;p&gt;&lt;strong&gt;Error!&lt;/strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number:  $phone\r\n
Email Address: $email\r\n
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\r\n
I wish to requ
the fields marked with a red asterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$email2=$_POST&#1111;&quote;email2&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$Contact_Time=$_POST&#1111;&quote;Contact_Time&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'&lt;p&gt;&lt;strong&gt;Error!&lt;/strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number:  $phone\r\n
Email Address: $email\r\n
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\r\n
I wish to request the following additional information: $Textarea&quote;);
if ($formsent) {
  echo &quote;&lt;p&gt; Hello,&lt;strong&gt; $firstname&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;rm.

http://www.inspired-evolution.com/Contact.php

the fields marked with a red asterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company nameerror now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST[&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$email2=$_POST&#1111;&quote;email2&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$Contact_Time=$_POST&#1111;&quote;Contact_Time&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'&lt;p&gt;&lt;strong&gt;Error!&lt;/strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number:  $phone\r\n
Email Address: $email\r\n
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\r\n
I wish to request the following additional information: $Textarea&quote;);
if ($formsent) {
  echo &quote;&lt;p&gt; Hello,&lt;strong&gt; $firstname&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt; We have received your request for additional information, and will respond shortly.&lt;/p&gt;
&lt;p&gt; Thanks for visiting inspired-evolution.com and have a wonderful day!&lt;/p&gt;&quote;;

}
?&gt;
I'm afraid I am going to need someone to walk me through the proto validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST&#1111;&quote;Message&quote;];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'&lt;p&gt;&lt;strong&gt;Error!&lt;/strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company name: $companysome problems with this form.

http://www.inspired-evolution.com/Contact.php

the fields marked with a red asterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p></br>';    include 'include/contact.php'; return; }

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
echo '<p>Invalid email address entered</p></br>'; n /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p></br>';    include 'include/contact.php'; return; }

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
echo '<p>Invalid email address entered</p></br>'; include
'include/contact.php';  return; }

$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
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\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>";

}
?>
I'm afraid I am going to need someone to walk me through the process of validating each field, or link me to a good tutor1]

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p></br>';    include 'include/contact.php'; return; }

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
echo '<p>Invalid email address entered</p></br>'; include
'include/contact.php';  return; }

$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
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\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>";

}
?>


I'm afraid I am going to need someone to walk me through the process of validating each field, or link me to a good tutorial on this.

thanks!;
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p></br>';    include 'include/contact.php'; return; }

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
echo '<p>Invalid email address entered</p></br>'; include
'include/contact.php';  return; }

$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
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\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>";

}
?>


I'm afraid I am going to need someone to walk me through the process of validating each field, or link me to a good tutorial on this.

thanks!
Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$email2=$_POST&#1111;&quote;email2&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$Contact_Time=$_POST&#1111;&quote;Contact_Time&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'&lt;p&gt;&lt;strong&gt;Error!&lt;/strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number:  $phone\r\n
Email Address: $email\r\n
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\r\n
I wish to request the following additional information: $Textarea&quote;);
if ($formsent) {
  echo &quote;&lt;p&gt; Hello,&lt;strong&gt; $firstname&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt; We have received your request for additional information, and will respond shortly.&lt;/p&gt;
&lt;p&gt; Thanks for visiting inspired-evolution.com and have a wonderful day!&lt;/p&gt;&qeg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST&#1111;&quote;Message&quote;];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'&lt;p&gt;&lt;strong&gt;Error!&lt;/strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number:  $phone\r\n
Email Address: $email\r\n
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\r\n
I wish to request the following additional information: $Textarea&quote;);
if ($formsent) {
  echo &quote;&lt;p&gt; Hello,&lt;strong&gt; $firstname&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt; We have received your request for additional information, and will re;
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p>&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&amstill having some problems with this form.

http://www.inspired-evolution.com/Contact.php

the fields marked with a red asterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p></br>';    include 'include/contact.php'; return; }

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
echo '<p>Invalid email address entered</p></br>'; include
'include/contact.php';  return; }

$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
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\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["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p></br>';    include 'include/contact.php'; return; }

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
echo '<p>Invalid email address entered</p></br>'; include
'include/contact.php';  return; }

$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
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\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>";

}
?>
I'm afraid I am going to need someone to walk me through the process of validating each field, or link me to a good tutorial on this.

thanks!th this form.

http://www.inspired-evolution.com/Contact.php

the fields marked with a red asterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p></br>';    include 'include/contact.php'; return; }

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
echo '<p>Invalid email address entered</p></br>'; include
'include/contact.php';  return; }

$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
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\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>";

}
?>
I'm afraid I am going to need someone to walk me through the process of validating eI am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p></br>';    include 'include/contact.php'; return; }

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
echo '<p>Invalid email address entered</p></br>'; include
'include/contact.php';  return; }

$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
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\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>";

}
?>
I'm afraid I am going to need someone to walk me through the process of validating each field, or link me to a good tutorial on this.

thanks!with this form.

http://www.inspired-evolution.com/Contact.php

the fields marked with a red asterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$email2=$_POST&#1111;&quote;email2&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$Contact_Time=$_POST&#1111;&quote;Contact_Time&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'&lt;p&gt;&lt;strong&gt;Error!&lt;/strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number:  $phone\r\n
Email Address: $email\r\n
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\r\n
I wish to request the following additional information: $Textarea&quote;);
if ($formsent) {
  echo &quote;&lt;p&gt; Hello,&lt;strong&gt; $firstname&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt; We have received your request for additional information, and will respond shortly.&lt;/p&gt;
&lt;p&gt; Thanks for visiting inspired-evolution.com andror, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$Contact_Time=$_POST&#1111;&quote;Contact_Time&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'&lt;p&gt;&lt;strong&gt;Error!&lt;/strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number:  $phone\r\n
Email Address: $email\r\n
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\r\n
I wish to request the following additional information: $Textarea&quote;);
if ($formsent) {
  echo &quote;&ltow:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p></br>';    include 'include/contact.php'; return; }

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
echo '<p>Invalid email address entered</p></br>'; include
'include/contact.php';  return; }

$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
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\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>";

}
?>
I'm afraid I am going to need someone to walk me througquote;firstname"];
$name=$_POST["lastname"];
$company=$_POST[&quote;company&quote;];
$phone=$_POSTї&quote;phone&quote;];
$email=$_POSTї"email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference&quote;];
$Contact_Time=$_POSTї&quote;Contact_Time&quote;];
$message=$_POSTї&quote;Message&quote;];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'&lt;p&gt;&lt;strong&gt;Error!&lt;/strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^їa-z0-9]+(ї_\\.-]їa-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(їa-z0-9]+(ї\.-]їa-z0-9]+)*)+&quote;.&quote;\\.їa-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number: $phone\r\n
Email Address: $email\r\n
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\r\n
I wish to request the following additional information: $Textarea&quote;);
if ($formsent) {
echo &quote;&lt;p&gt; Hello,&lt;strong&gt; $firstname&lt;/strong&amow have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST&#1111;&quote;Contact_Time&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'&lt;p&gt;&lt;strong&gt;Error!&lt;/strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number:  $phone\r\n
Email Address: $email\r\n
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me viaphp

the fields marked with a red asterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p></br>';    include 'include/contact.php'; return; }

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
echo '<p>Invalid email address entered</p></br>'; include
'include/contact.php';  return; }

$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
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\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>";

}
?>
I'm afraid I am going to need someone to walk me through the process of validating each field, or link me to a good tutorial on this.

thanks!me problems with this form.

http://www.inspired-evolution.com/Contact.php

the fields marked with a red asterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone"];
$email=$_POST["email"];
$email2=$_POST["email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POST["Contact_Preference"];
$Contact_Time=$_POST["Contact_Time"];
$message=$_POST["Message"];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'<p><strong>Error!</strong> Fields marked * are required to
continue.</p></br>';    include 'include/contact.php'; return; }

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
echo '<p>Invalid email address entered</p></br>'; include
'include/contact.php';  return; }

$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
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Contact_Preference\r\n
The best time to reach me is: $Contact_Time\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>";

}
?>
I'm afraid I am going to need someone to walk me through the process of validating each field, or link me to a good tutorial on this.

thanks!25c8151]

<?php
$name=$_POST["firstname"];
$name=$_POST["lastname"];
$company=$_POST["company"];
$phone=$_POST["phone&quote;];
$email=$_POSTї&quote;email&quote;];
$email2=$_POSTї"email2"];
$URL=$_POST["URL"];
$Contact_Preference=$_POSTї&quote;Contact_Preference&quote;];
$Contact_Time=$_POSTї&quote;Contact_Time&quote;];
$message=$_POSTї&quote;Message&quote;];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'&lt;p&gt;&lt;strong&gt;Error!&lt;/strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^їa-z0-9]+(ї_\\.-]їa-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(їa-z0-9]+(ї\.-]їa-z0-9]+)*)+&quote;.&quote;\\.їa-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number: $phone\r\n
Email Address: $email\r\n
Retyped Email Address: $email2\r\n
URL: $URL\r\n
Please Contact me via: $Constill having some problems with this form.

http://www.inspired-evolution.com/Contact.php

the fields marked with a red asterisk, are the ones I want to be required.

I am getting this error now:

Parse error: parse error, unexpected T_STRING in /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php on line 35

the php code I now have to validate is:

Code: Select all

&lt;?php
$name=$_POST&#1111;&quote;firstname&quote;];
$name=$_POST&#1111;&quote;lastname&quote;];
$company=$_POST&#1111;&quote;company&quote;];
$phone=$_POST&#1111;&quote;phone&quote;];
$email=$_POST&#1111;&quote;email&quote;];
$email2=$_POST&#1111;&quote;email2&quote;];
$URL=$_POST&#1111;&quote;URL&quote;];
$Contact_Preference=$_POST&#1111;&quote;Contact_Preference&quote;];
$Contact_Time=$_POST&#1111;&quote;Contact_Time&quote;];
$message=$_POST&#1111;&quote;Message&quote;];

if ((!$firstname) || (!$Contact_Preference)) {    echo
'&lt;p&gt;&lt;strong&gt;Error!&lt;/strong&gt; Fields marked * are required to
continue.&lt;/p&gt;&lt;/br&gt;';    include 'include/contact.php'; return; }

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;
.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
echo '&lt;p&gt;Invalid email address entered&lt;/p&gt;&lt;/br&gt;'; include
'include/contact.php';  return; }

$formsent=mail(&quote;webguync@gmail.com&quote;,
&quote;There has been a disturbance in the force&quote;,
&quote;Request from:$firstname $lastname\r\n
Company name: $company\r\n
Phone Number:  $phone\r\n
Email Address: $email\r\n
Retyped Email Address: $email2\r\n
URL: $URL\r\
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Which line in your snippet is line 35 in your code? I'm guessing the problem is because you've got some strings split up on multiple lines, but I don't know for sure.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

I went through an put your code in a syntax highlighter. There's no error in your code that you posted. Perhaps you should post the full code, so we could have a look at what the problem may be. From the error message it's most likely a missing ' or ;.

Also you might want to make your code a little bit neater for future reading. Or perhaps store the body of your email in a variable (like $body)
bruceg
Forum Contributor
Posts: 174
Joined: Wed Mar 16, 2005 11:07 am
Location: Morrisville, NC
Contact:

Post by bruceg »

I think it's this/:

$name=$_POST["firstname"];

though not positive since I am using BBEdit.

what I posted above, was all of the PHP code...
Jim_Bo
Forum Contributor
Posts: 390
Joined: Sat Oct 02, 2004 3:04 pm

Post by Jim_Bo »

Hi,

I found a couple of issues that could be your problem:

You were checking agaist $firstname when the variable didnt exist:

$name=$_POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'<center><b>Error!</b> Fields marked * are required to continue.</center></br>';
	include 'include/contact.php';
	return;
}

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
	echo '<center>Invalid email address entered</center></br>';
	include'include/contact.php';
	return;
}

$email_address = "webguync@gmail.com";
$subject = "There has been a disturbance in the force";

$message = "Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea";

mail($email_address, $subject, $message, "From: $email \nX-Mailer: PHP/" . phpversion());

echo "Hi, <b>$firstname</b>.<br>
We have received your request for additional information, and will respond shortly.<br>
Thanks for visiting inspired-evolution.com and have a wonderful day!<br><br>
Regards<br>
Admin";

?>
hthour problem:

You were checking agaist $firstname when the variable didnt exist:

$name=$_POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

&lt;?php

$firstname = $_POST&#1111;'firstname'];
$lastname = $_POST&#1111;'lastname'];
$company = $_POST&#1111;'company'];
$phone = $_POST&#1111;'phone'];
$email = $_POST&#1111;'email'];
$email2 = $_POST&#1111;'email2'];
$URL = $_POST&#1111;'URL'];
$Contact_Preference = $_POST&#1111;'Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea&quote;;

mail($email_address, $subject, $message, &quote;From: $email \nX-Mailer: PHP/&quote; . phpversion());

echo &quote;Hi, &lt;b&gt;$firstname&lt;/b&gt;.&lt;br&gt;
We have received your request for additional information, and will respond shortly.&lt;br&gt;
Thanks for visiting i $firstname when the variable didnt exist:

$name=$_POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

&lt;?php

$firstname = $_POST&#1111;'firstname'];
$lastname = $_POST&#1111;'lastname'];
$company = $_POST&#1111;'company'];
$phone = $_POST&#1111;'phone'];
$email = $_POST&#1111;'email'];
$email2 = $_POST&#1111;'email2'];
$URL = $_POST&#1111;'URL'];
$Contact_Preference = $_POST&#1111;'Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea&quote;;

mail($email_address, $subject, $message, &quote;From: $email \nX-Mailer: PHP/&quote; . phpversion());

echo &quote;Hi, &lt;b&gt;$firstname&lt;/b&gt;.&lt;br&gt;
We have received your request _POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

&lt;?php

$firstname = $_POST&#1111;'firstname'];
$lastname = $_POST&#1111;'lastname'];
$company = $_POST&#1111;'company'];
$phone = $_POST&#1111;'phone'];
$email = $_POST&#1111;'email'];
$email2 = $_POST&#1111;'email2'];
$URL = $_POST&#1111;'URL'];
$Contact_Preference = $_POST&#1111;'Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea&quote;;

mail($email_address, $subject, $message, &quote;From: $email \nX-Mailer: PHP/&quote; . phpversion());

echo &quote;Hi, &lt;b&gt;$firstname&lt;/b&gt;.&lt;br&gt;
We have received your request for additional information, and will responnt exist:

$name=$_POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST&#1111;'email'];
$email2 = $_POST&#1111;'email2'];
$URL = $_POST&#1111;'URL'];
$Contact_Preference = $_POST&#1111;'Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best tiouple of issues that could be your problem:

You were checking agaist $firstname when the variable didnt exist:

$name=$_POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

&lt;?php

$firstname = $_POST&#1111;'firstname'];
$lastname = $_POST&#1111;'lastname'];
$company = $_POST&#1111;'company'];
$phone = $_POST&#1111;'phone'];
$email = $_POST&#1111;'email'];
$email2 = $_POST&#1111;'email2'];
$URL = $_POST&#1111;'URL'];
$Contact_Preference = $_POST&#1111;'Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea&quote;;

mail($email_address, $subject, $message, &quote;From: $email \nX-Mailer: PHP/&quote; . phpversion());

echo &quote;Hi, &lt;b&gt;$firstname&lt;/b&gt;.&lt;br&gt;
We have received your request for additional information, and will respond shortly.&lt;br&gt;
Thanks for visiting inspired-evolution.com and have a wonderful day!&lt;br&gt;&lt;br&gt;
Regards&lt;br&gt;
ouple of issues that could be your problem:

You were checking agaist $firstname when the variable didnt exist:

$name=$_POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'<center><b>Error!</b> Fields marked * are required to continue.</center></br>';
	include 'include/contact.php';
	return;
}

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
	echo '<center>Invalid email address entered</center></br>';
	include'include/contact.php';
	return;
}

$email_address = "webguync@gmail.com";
$subject = "There has been a distuy = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'<center><b>Error!</b> Fields marked * are required to continue.</center></br>';
	include 'include/contact.php';
	return;
}

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
	echo '<center>Invalid email address entered</center></br>';
	include'include/contact.php';
	return;
}

$email_address = "webguync@gmail.com";
$subject = "There has been a disturbance in the force";

$message = "Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea";

mail($email_address, $subject, $message, "From: $email \nX-Mailer: PHP/" . phpversion());

echo "Hi, <b>$firstname</b>.<br>
We have received your request for additional information, and will respond shortly.<br>
Thanks for visiting inspired-evolution.com and have a wonderful day!<br><br>
Regards<br>
Admin";

?>
hthST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
echo'<center><b>Error!</b> Fields marked * are required to continue.</center></br>';
include 'include/contact.php';
return;
}

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"."@&quote;.&quote;(їa-z0-9]+(ї\.-]їa-z0-9]+)*)+&quote;.&quote;\\.їa-z]{2,}&quott $firstname when the variable didnt exist:

$name=$_POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST&#1111;'Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_ariable didnt exist:

$name=$_POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

&lt;?php

$firstname = $_POST&#1111;'firstname'];
$lastname = $_POST&#1111;'lastname'];
$company = $_POST&#1111;'company'];
$phone = $_POST&#1111;'phone'];
$email = $_POST&#1111;'email'];
$email2 = $_POST&#1111;'email2'];
$URL = $_POST&#1111;'URL'];
$Contact_Preference = $_POST&#1111;'Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea&quote;;

mail($email_address, $subject, $message, &quote;From: $email \nX-Mailer: PHP/&quote; . phpversion());

echo lem:

You were checking agaist $firstname when the variable didnt exist:

$name=$_POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'<center><b>Error!</b> Fields marked * are required to continue.</center></br>';
	include 'include/contact.php';
	return;
}

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
	echo '<center>Invalid email address entered</center></br>';
	include'include/contact.php';
	return;
}

$email_address = "webguync@gmail.com";
$subject = "There hantact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

&lt;?php

$firstname = $_POST&#1111;'firstname'];
$lastname = $_POST&#1111;'lastname'];
$company = $_POST&#1111;'company'];
$phone = $_POST&#1111;'phone'];
$email = $_POST&#1111;'email'];
$email2 = $_POST&#1111;'email2'];
$URL = $_POST&#1111;'URL'];
$Contact_Preference = $_POST&#1111;'Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea&quote;;

mail($email_address, $subject, $message, &quote;From: $email \nX-Mailer: PHP/&quote; . phpversion());

echo &quote;Hi, &lt;b&gt;$firstname&lt;/b&gt;.&lt;br&gt;
We have received your request for additional information, and will respond shortly.&lt;br&gt;
Thanks for visiting inspired-evolution.com and have a wonderful day!&lt;br&gt;&lt;br&gt;
Regards&ampnes and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a des that could be your problem:

You were checking agaist $firstname when the variable didnt exist:

$name=$_POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'<center><b>Error!</b> Fields marked * are required to continue.</center></br>';
	include 'include/contact.php';
	return;
}

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
	echo '<center>Invalid email address entered</center></br>';
	include'include/contact.php';
	return;
}

$email_addr/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line

Code: Select all

&lt;?php

$firstname = $_POST&#1111;'firstname'];
$lastname = $_POST&#1111;'lastname'];
$company = $_POST&#1111;'company'];
$phone = $_POST&#1111;'phone'];
$email = $_POST&#1111;'email'];
$email2 = $_POST&#1111;'email2'];
$URL = $_POST&#1111;'URL'];
$Contact_Preference = $_POST&#1111;'Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea&quote;;

mail($email_address, $subject, $message, &quote;From: $email \nX-Mailer: PHP/&quote; . phpversion());

echo &quote;Hi, &lt;b&gt;$firstname&lt;/b&gt;.&lt;br&gt;
We have received your request for additional information, and will respond shortly.&lt;br&gt;
Thanks for visiting inspired-evolution.com and have a wonderful day!&lt;br&gt;&lt;br&gt;
Regards&lt;br&gt;
Admin&quote;;

?&gt;[/pis code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'<center><b>Error!</b> Fields marked * are required to continue.</center></br>';
	include 'include/contact.php';
	return;
}

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
	echo '<center>Invalid email address entered</center></br>';
	include'include/contact.php';
	return;
}

$email_address = "webguync@gmail.com";
$subject = "There has been a disturbance in the force";

$message = "Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea";

mail($email_address, $subject, $message, "From: $email \nX-Mailer: PHP/" . phpversion());

echo "Hi, <b>$firstname</b>.<br>
We have received your request for additional information, and will respond shortly.<br>
Thanks for visiting inspired-evolution.com and have a wonderful day!<br><br>
Regards<br>
Admin";

?>
hthPreference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
echo'<center><b>Error!</b> Fields marked * are required to continue.</center></br>';
include 'include/contact.php';
return;
}

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
echo '<center>Invalid email address entered</center></br>';
include'include/contact.php';
return;
}

$email_address = "webguync@gmail.com";
$subject = "There has been a disturbance in the force";

$message = "Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number: $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea";

mail($email_address, $subject, $message, "From: $email \nX-Mailer: PHP/" . phpversion());

echo "Hi, <b>$firstname</b>.<br>
We have received your request for additional information, and will respond shortly.<br>
Thanks for visiting inspired-evolution.com and have a wonderful day!<br><br>
Regards<br>
Admin";

?>

hthence)) {

also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

&lt;?php

$firstname = $_POST&#1111;'firstname'];
$lastname = $_POST&#1111;'lastname'];
$company = $_POST&#1111;'company'];
$phone = $_POST&#1111;'phone'];
$email = $_POST&#1111;'email'];
$email2 = $_POST&#1111;'email2'];
$URL = $_POST&#1111;'URL'];
$Contact_Preference = $_POST&#1111;'Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea&quote;;

mail($email_address, $subject, $message, &quote;From: $email \nX-Mailer: PHP/&quote; . phpversion());

echo &quote;Hi, &lt;b&gt;$firstname&lt;/b&gt;.&lt;br&gt;
We have received your request for additional information, and will respond shortly.&lt;br&gt;
Thanks for visiting inr server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea&quote;;

mail($email_address, $subject, $message, &quote;From: $email \nX-Mailer: PHP/&quote; . phpversion());

echo &quote;Hi, &lt;b&gt;$firstname&lt;/b&a_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'<center><b>Error!</b> Fields marked * are required to continue.</center></br>';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$emailouple of issues that could be your problem:

You were checking agaist $firstname when the variable didnt exist:

$name=$_POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

&lt;?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea&quote;;

mail($email_address, $subject, $message, &quote;From: $email \nX-Mailer: PHP/&quote; . phpversion());

echo &quote;Hi, &lt;b&gt;$firs fom this site, it paste the lot into one line

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'<center><b>Error!</b> Fields marked * are required to continue.</center></br>';
	include 'include/contact.php';
	return;
}

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
	echo '<center>Invalid email address entered</center></br>';
	include'include/contact.php';
	return;
}

$email_address = "webguync@gmail.com";
$subject = "There has been a disturbance in the force";

$message = "Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea";

mail($email_address, $subject, $message, "From: $email \nX-Mailer: PHP/" . phpversion());

echo "Hi, <b>$firstname</b>.<br>
We have received your request for additional information, and will respond shortly.<br>
Thanks for visiting inspired-evolution.com and have a wonderful day!<br><br>
Regards<br>
Admin";

?>
hth your problem:

You were checking agaist $firstname when the variable didnt exist:

$name=$_POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'<center><b>Error!</b> Fields marked * are required to continue.</center></br>';
	include 'include/contact.php';
	return;
}

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
	echo '<center>Invalid email address entered</center></br>';
	include'include/contact.php';
	return;
}

$email_address = "webguync@gmail.com";
$subject = "There has been a disturbance in the force";

$message = "Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea";

mail($email_address, $subject, $message, "From: $email \nX-Mailer: PHP/" . phpversion());

echo "Hi, <b>$firstname</b>.<br>
We have received your request for additional information, and will respond shortly.<br>
Thanks for visiting inspired-evolution.com and have a wonderful day!<br><br>
Regards<br>
irstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'<center><b>Error!</b> Fields marked * are required to continue.</center></br>';
	include 'include/contact.php';
	return;
}

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
	echo '<center>Invalid email address entered</center></br>';
	include'include/contact.php';
	return;
}

$email_address = "webguync@gmail.com";
$subject = "There has been a disturbance in the force";

$message = "Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea";

mail($email_address, $subject, $message, "From: $email \nX-Mailer: PHP/" . phpversion());

echo "Hi, <b>$firstname</b>.<br>
We have received your request for additional information, and will respond shortly.<br>
Thanks for visiting inspired-evolution.com and have a wonderful day!<br><br>
Regards<br>
Admin";

?>
hthbe your problem:

You were checking agaist $firstname when the variable didnt exist:

$name=$_POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

&lt;?php

$firstname = $_POST&#1111;'firstname'];
$lastname = $_POST&#1111;'lastname'];
$company = $_POST&#1111;'company'];
$phone = $_POST&#1111;'phone'];
$email = $_POST&#1111;'email'];
$email2 = $_POST&#1111;'email2'];
$URL = $_POST&#1111;'URL'];
$Contact_Preference = $_POST&#1111;'Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea&quote;;

mail($email_address, $subject, $message, &quote;From: $email \nX-Mailer: PHP/&quote; . phpversion());

echo &quote;Hi, &lt;b&gt;$firstname&lt;/b&gt;.&lt;br&gt;
We have received your request for additional information, and will respond shoref2]

also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST&#1111;'lastname'];
$company = $_POST&#1111;'company'];
$phone = $_POST&#1111;'phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST&#1111;'Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional informatireference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

<?php

$firstname = $_POST&#1111;'firstname'];
$lastname = $_POST&#1111;'lastname'];
$company = $_POST&#1111;'company'];
$phone = $_POST&#1111;'phone'];
$email = $_POST&#1111;'email'];
$email2 = $_POST&#1111;'email2'];
$URL = $_POST&#1111;'URL'];
$Contact_Preference = $_POST&#1111;'Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea&quote;;

mail($email_address, $subject, $message, &quote;From: $email \nX-Mailer: PHP/&quote; . phpversion());

echo &quote;Hi, &lt;b&gt;$firstname&lt;/b&gt;.&lt;br&gt;
We have received your request for additional information, and will respond shortly.&lt;br&gt;
Thanks for visiting inspired-evolution.com and have a wonderful day!&lt;br&gt;&lt;br&gt;
Regardte, it paste the lot into one line

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST&#1111;'lastname'];
$company = $_POST&#1111;'company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea&quote;;

mail($email_address, $subject, $message, &quote;From: $ose 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phonethe variable didnt exist:

$name=$_POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'<center><b>Error!</b> Fields marked * are required to continue.</center></br>';
	include 'include/contact.php';
	return;
}

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
	echo '<center>Invalid email address entered</center></br>';
	include'include/contact.php';
	return;
}

$email_address = "webguync@gmail.com";
$subject = "There has been a disturbance in the force";

$message = "Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea";

mail($email_address, $subject, $message, "From: $email \nX-Mailer: PHP/" . phpversion());

echo "Hi, <b>$firstname</b>.<br>
We have received your request for additional information, and will respond shortly.<br>
Thanks for visiting inspired-evolution.com and have a wonderful day!<br><br>
Regards<br>
Admin";

?>
hth that could be your problem:

You were checking agaist $firstname when the variable didnt exist:

$name=$_POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'<center><b>Error!</b> Fields marked * are required to continue.</center></br>';
	include 'include/contact.php';
	return;
}

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
	echo '<center>Invalid email address entered</center></br>';
	include'include/contact.php';
	return;
}

$email_address = "webguync@gmail.com";
$subject = "There has been a disturbance in the force";

$message = "Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea";

mail($email_address, $subject, $message, "From: $email \nX-Mailer: PHP/" . phpversion());

echo "Hi, <b>$firstname</b>.<br>
We have received your request for additional information, and will respond shortly.<br>
Thanks for visiting inspired-evolution.com and have a wonderful day!<br><br>
Regards<br>
Admin";

?>
hthde:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST&#1111;'company'];
$phone = $_POST&#1111;'phone'];
$email = $_POST&#1111;'email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST&#1111;'Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)+&quote;.&quote;\\.&#1111;a-z]{2,}&quote;.&quote;$&quote;,$email)) {
	echo '&lt;center&gt;Invalid email address entered&lt;/center&gt;&lt;/br&gt;';
	include'include/contact.php';
	return;
}

$email_address = &quote;webguync@gmail.com&quote;;
$subject = &quote;There has been a disturbance in the force&quote;;

$message = &quote;Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Numbeouple of issues that could be your problem:

You were checking agaist $firstname when the variable didnt exist:

$name=$_POST["firstname"];

Code: Select all

if ((!$firstname) || (!$Contact_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

<?php

$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$URL = $_POST['URL'];
$Contact_Preference = $_POST['Contact_Preference'];
$Contact_Time = $_POST['Contact_Time'];
$message = $_POST['Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'<center><b>Error!</b> Fields marked * are required to continue.</center></br>';
	include 'include/contact.php';
	return;
}

if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
	echo '<center>Invalid email address entered</center></br>';
	include'include/contact.php';
	return;
}

$email_address = "webguync@gmail.com";
$subject = "There has been a disturbance in the force";

$message = "Request from: $firstname $lastname\n\n
Company name: $company\n
Phone Number:  $phone\n
Email Address: $email\n
URL: $URL\n
Please Contact me via: $Contact_Preference\n
The best time to reach me is: $Contact_Time\n
I wish to request the following additional information: $Textarea";

mail($email_address, $subject, $message, "From: $email \nX-Mailer: PHP/" . phpversion());

echo "Hi, <b>$firstname</b>.<br>
We have received your request for additional information, and will respond shortly.<br>
Thanks for visiting inspired-evolution.com and have a wonderful day!<br><br>
Regards&ltt_Preference)) {
also does 'include/contact.php' exist in your server? if not then you will get a require error .. try deleting those 2 lines and retry.

Try this code:

Oh yer when you copy and paste code fom this site, it paste the lot into one line :(

Code: Select all

&lt;?php

$firstname = $_POST&#1111;'firstname'];
$lastname = $_POST&#1111;'lastname'];
$company = $_POST&#1111;'company'];
$phone = $_POST&#1111;'phone'];
$email = $_POST&#1111;'email'];
$email2 = $_POST&#1111;'email2'];
$URL = $_POST&#1111;'URL'];
$Contact_Preference = $_POST&#1111;'Contact_Preference'];
$Contact_Time = $_POST&#1111;'Contact_Time'];
$message = $_POST&#1111;'Message'];

if ((!$firstname) || (!$Contact_Preference)) {
	echo'&lt;center&gt;&lt;b&gt;Error!&lt;/b&gt; Fields marked * are required to continue.&lt;/center&gt;&lt;/br&gt;';
	include 'include/contact.php';
	return;
}

if (!eregi(&quote;^&#1111;a-z0-9]+(&#1111;_\\.-]&#1111;a-z0-9]+)*&quote;.&quote;@&quote;.&quote;(&#1111;a-z0-9]+(&#1111;\.-]&#1111;a-z0-9]+)*)
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

Jim_Bo wrote: Oh yer when you copy and paste code fom this site, it paste the lot into one line :(
not in FF :D
Post Reply