This is my code, it seems that either I have the curly brackets in the
wrong place OR there is a limit to how many times you can set IF's.  So
before I pull out the shotgun, and take out this machine, I figure I would
ask the "Cousel Of the PHP OverLords".

So you know, I happen to also be using "validateEmailFormat"  that was
suggested a few minutes ago by Manuel... Thanx by the way, you saved me
some time.
I also chage the permissions on the files on the server to 777 so there
would be no mistake.
I also changed the order of the IF statements for the validateEmail class.
I have run it both ways with the same result.

TIA

<?
include "config.php";
include "form_validator.class";
include "validateEmailFormat.php";
if ($submit) {
      if ($form_complete)
                    {
          $my_form = new form_validator;
if($my_form ->validate_fields("first, last, email, company, address, city,
state, zip, phone")) {
          $isValid = validateEmailFormat($email);
     if(!$isValid) {
                    echo "Your Email Address Is InValid, \n Please Press
your Web Browsers 'BACK' button and re-enter your email address";
                              }else{
          $db = mysql_connect($dbhost,$dbuname,$dbpass);
          mysql_select_db($dbname,$db);
          $sql = "INSERT INTO $prefix";
          $sql .= "(first, last, email, company, address, city, state, zip,
phone, fax, mobile, comments)";
          $sql .= "VALUES";
          $sql .= "('$first', '$last', '$email', '$company', '$address',
'$city', '$state', '$zip', '$phone', '$fax', '$mobile', '$comments')";
          $result = mysql_query($sql);
     if (!$result) {echo("error: " . mysql_error() . "\n$sql\n");}
          echo "<b>Thank You</b> for your submission.<b>One of our agents
will review your submission and forward your username and password.\n";
          echo "You will not receive this email instantly\n";
          }else{
          echo ($my_form->error_message . "<br><br>");
               }
          }
     }
}
else
{
?>
<HTML>
<FORM>
html code in here,
</FORM>
</HTML>
<?
}
?>



Thank You

<><><><><><><><><><><><><><><><>

Daniel Negrón
Lotus Notes Administrator / Developer
KB Electronics, Inc.
954.346.4900x122
http://www.kbelectronics.com

<><><><><><><><><><><><><><><><>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to