New set of eyes?

From: Date: Wed, 19 Jun 2002 16:28:35 +0000
Subject: New set of eyes?
Groups: php.db 
Request: Send a blank email to php-db+get-19881@lists.php.net to get a copy of this message
I think I am over looking something here... If someone could look over this snippit and tell me what I am doing wrong, it would be a great help! Thanks in advance, Jas <?php /* Combine checkboxes into one variable */ $site = $yes + $no; /* Check for missing form elements */ if (!$fname || !$lname || !$addy || !$city || !$st || !$zip || !$aphone || !$phone || !$email || !$inquire || !$refer || !$package || !$comments) { header ("Location: contact.php"); exit; } else { /* Format the Date and Time */ $hour = (date("H")); $day = (date("d")); $date = (date("F $day, Y")); /* Check for client IP address if behind proxy or firewall */ if (getenv(HTTP_X_FORWARDED_FOR)) { $ipaddy = getenv(HTTP_X_FORWARDED_FOR); } else { $ipaddy = getenv(REMOTE_ADDR); } /* Start and register session variables */ session_start(); session_register('$ipaddy'); /* Connect to database and insert bid */ require '/path/to/database/connection/script/db.php'; $db_table = "demo_contact"; $sql = @mysql_query("INSERT INTO $db_table (fname,lname,addy,city,st,zip,aphone,phone,email,inquire,refer,site,package, comments,ipaddy,date) VALUES ('$fname','$lname','$addy','$city','$st','$zip','$aphone','$phone','$email', '$inquire','$refer','$site','$package','$comments','$ipaddy','$date')") or die("Nothing is working today, just give up and start flipping burgers!"); // this is where my errors are /* Email confirmation to client & webmaster */ mail("$email", "Thanks for your request!", "Dear $fname $lname,\n\nThank you for using our online demo application, we are certain that we can save you alot of time and energy with our customized content management application. A sales representative will be contacting you shortly in regards to your bid request.", "From: email@email.com"); mail("email@email.com", "Web Design Bid", "Name: $fname$lname\nAddress: $addy\nCity: $city\nState: $st\nZip Code: $zip\nPhone: ($aphone)$phone\nEmail: $email\nInquiring about: $inquire\nRefered from: $refer\nExisting Site: $site\nWeb Package: $package\nComments: $comments\nIP Address: $ipaddy\nDate: $date\n"); } ?>

« previous php.db (#19881) next »