INSERT INTO tbFindNLdirectory (`iID`, `iBusinessType`, `sContactFullName`, `sContactEmailAddress`, `sContactCompanyPosition`, `sCompanyBusinessName`, `sCompanyWebsiteAddress`, `sCompanyPhoneNumber`, `sCompanyFaxNumber`, `sCompanyLocation`, `sCompanyProvince`, `sCompanyCity`, `iCompanyStreetNumber`, `sCompanyStreetAddress`, `sCompanyPostalCode`, `sCompanyLatitude`, `sCompanyLongitude`, `sCompanyHoursOfOperationMonday`, `sCompanyHoursOfOperationTuesday`, `sCompanyHoursOfOperationWednesday`, `sCompanyHoursOfOperationThursday`, `sCompanyHoursOfOperationFriday`, `sCompanyHoursOfOperationSaturday`, `sCompanyHoursOfOperationSunday`, `sCompanyWheelchairAccessible`, `sPaymentTypeVisa`, `sPaymentTypeMastercard`, `sPaymentTypeAmex`, `sPaymentTypeDiners`, `sPaymentTypePaypal`, `sCompanyPaymentTypesOther`, `sCompanyAcceptDebitCards`, `sCompanyAtmOnSite`, `iDiscountAmount`, `sDiscountItem`, `sDiscountRestrictions`, `sDiscountDescription`, `sUpgradePhotoOne`, `sUpgradePhotoTwo`, `sUpgradePhotoThree`, `sUpgradePhotoFour`, `sUpgradePhotoFive`, `sDiscount1000words, `sDiscountBacklink`, `sDiscountInternalLink`, `sPaymentSetupFee`, `sPaymentYearlyFee`, `sPaymentLifetimeListing`, `sDiscountEmployee`, `iDiscountAmountSetupFee`, `iDiscountAmountYearlyFee`, `iDiscountNumberOfYears`, `sDiscountStartBillingDate`, `sDiscountStartBillingAmount`, `sPaymentMethodCash`, `sPaymentMethodCreditCard`, `sPaymentMethodCheck`, `sPaymentMethodPaypal`, `sPaymentMethodEmailMoneyTransfer`, `sPaymentDetails`) VALUES ('5', '5', 'a', 'a', 'a', 'a', 'a', '(709) 257-2634', 'a', 'a', 'a', 'a', 'Alberta', '142.334', '-43.655', '9am - 5pm', '9am - 5pm', '9am - 5pm', '9am - 5pm', '9am - 5pm', 'a', 'a', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'a', 'yes', 'yes', '$142.55', 'Seagulls', 'Do not eat them', 'a', 'sl_solutions_body_text1.gif', 'wmconsultinga_3.sflb.ashx.jpg', 'Swoosh_Only_GIF.gif', 'swoosh.gif', 'logo-design-example-swoosh.gif', 'a', 'http://www.abc.com', 'http://www.online-onslaught.com', '$4500.33', '$5,000/month', 'yes', 'yes', 'Deborah Bourden', '$4500.33', '$5,000/month', '30', 'a', 'strStepSixAmountToStartBilling', 'yes', 'yes', 'please let this work. One misplaced $ has been screwing this up')
FindNL Business Test Thing
include("includes/dbConnect.php"); ?>
# STEP 1
$strStepOneFullName = nl2br($_POST['txtStepOneYourFullName']);
$strStepOneEmailAddress = nl2br($_POST['txtStepOneEmailAddress']);
$strStepOnePositionInCompany = nl2br($_POST['txtStepOnePositionInCompany']);
# STEP 2
$strStepTwoBusinessName = nl2br($_POST['txtStepTwoBusinessName']);
$strStepTwoWebsiteAddress = nl2br($_POST['txtStepTwoWebsiteAddress']);
$strStepTwoPhoneNumber = nl2br($_POST['txtStepTwoPhoneNumber']);
$strStepTwoFaxNumber = nl2br($_POST['txtStepTwoFaxNumber']);
$strStepTwoStreetNumber = nl2br($_POST['txtStepTwoStreetNumber']);
$strStepTwoStreetAddress = nl2br($_POST['txtStepTwoStreetAddress']);
$strStepTwoCityTown = nl2br($_POST['txtStepTwoCityTown']);
$optStepTwoProvince = nl2br($_POST['selectStepTwoProvince']);
$intStepTwoLatitude = nl2br($_POST['txtStepTwoLatitude']);
$intStepTwoLongitude = nl2br($_POST['txtStepTwoLongitude']);
$strStepTwoHoursOfOperationMonday = nl2br($_POST['txtStepTwoHoursOfOperationMonday']);
$strStepTwoHoursOfOperationTuesday = nl2br($_POST['txtStepTwoHoursOfOperationTuesday']);
$strStepTwoHoursOfOperationWednesday = nl2br($_POST['txtStepTwoHoursOfOperationWednesday']);
$strStepTwoHoursOfOperationThursday = nl2br($_POST['txtStepTwoHoursOfOperationThursday']);
$strStepTwoHoursOfOperationFriday = nl2br($_POST['txtStepTwoHoursOfOperationFriday']);
$strStepTwoHoursOfOperationSaturday = nl2br($_POST['txtStepTwoHoursOfOperationSaturday']);
$strStepTwoHoursOfOperationSunday = nl2br($_POST['txtStepTwoHoursOfOperationSunday']);
$strStepTwoWheelchairAccessible = nl2br($_POST['radStepTwoWheelchairAccessible']);
$strStepTwoPaymentTypeVisa = nl2br($_POST['chkStepTwoPaymentTypeVisa']);
$strStepTwoPaymentTypeMastercard = nl2br($_POST['chkStepTwoPaymentTypeMastercard']);
$strStepTwoPaymentTypeAmex = nl2br($_POST['chkStepTwoPaymentTypeAmex']);
$strStepTwoPaymentTypeDiners = nl2br($_POST['chkStepTwoPaymentTypeDiners']);
$strStepTwoPaymentTypePaypal = nl2br($_POST['chkStepTwoPaymentTypePaypal']);
$strStepTwoHoursPaymentTypeOther = nl2br($_POST['txtStepTwoHoursPaymentTypeOther']);
$strStepTwoAcceptDebitCards = nl2br($_POST['radStepTwoAcceptDebitCards']);
$strStepTwoAtmOnSite = nl2br($_POST['radStepTwoAtmOnSite']);
# STEP 3
$strStepThreeDiscountAmount = nl2br($_POST['txtStepThreeDiscountAmount']);
$strStepThreeDiscountItem = nl2br($_POST['txtStepThreeDiscountItem']);
$strStepThreeDiscountRestrictions = nl2br($_POST['txtStepThreeDiscountRestrictions']);
$strStepThreeDiscountDescription = nl2br($_POST['txtStepThreeDiscountDescription']);
# STEP 4
$strtStepFourSpecialPromotionsOffers = nl2br($_POST['txtStepFourSpecialPromotionsOffers']);
# STEP 5
$uploaddir = "uploads/";
$target_path = basename( $_FILES['txtStepFiveBusinessPhotoOne']['name']);
$target_path2 = basename( $_FILES['txtStepFiveBusinessPhotoTwo']['name']);
$target_path3 = basename( $_FILES['txtStepFiveBusinessPhotoThree']['name']);
$target_path4 = basename( $_FILES['txtStepFiveBusinessPhotoFour']['name']);
$target_path5 = basename( $_FILES['txtStepFiveBusinessPhotoFive']['name']);
move_uploaded_file($_FILES['txtStepFiveBusinessPhotoOne']['tmp_name'], "uploads/photoOne/" . $target_path);
move_uploaded_file($_FILES['txtStepFiveBusinessPhotoTwo']['tmp_name'], "uploads/photoTwo/" . $target_path2);
move_uploaded_file($_FILES['txtStepFiveBusinessPhotoThree']['tmp_name'], "uploads/photoThree/" . $target_path3);
move_uploaded_file($_FILES['txtStepFiveBusinessPhotoFour']['tmp_name'], "uploads/photoFour/" . $target_path4);
move_uploaded_file($_FILES['txtStepFiveBusinessPhotoFive']['tmp_name'], "uploads/photoFive/" . $target_path5);
$strStepFive1000words = nl2br($_POST['txtStepFive1000words']);
$strStepFiveBackLink = nl2br($_POST['txtStepFiveBackLink']);
$strStepFiveInternalLink = nl2br($_POST['txtStepFiveInternalLink']);
# STEP 6
$strStepSixSetupFee = nl2br($_POST['radStepSixSetupFee']);
$strStepSixYearlyFee = nl2br($_POST['radStepSixYearlyFee']);
$strStepSixFreeLifetimeListing = nl2br($_POST['radStepSixFreeLifetimeListing']);
$strStepSixEmployee = nl2br($_POST['txtStepSixEmployee']);
$strStepSixSetupFee = nl2br($_POST['txtStepSixSetupFee']);
$strStepSixYearlyFee = nl2br($_POST['txtStepSixYearlyFee']);
$strStepSixNumbersOfDiscountYears = nl2br($_POST['txtStepSixNumbersOfDiscountYears']);
$strStepSixDateToStartBilling = nl2br($_POST['txtStepSixDateToStartBilling']);
$strStepSixAmountToStartBilling = nl2br($_POST['txtStepSixAmountToStartBilling']);
$strStepSixPaymentMethodCash = nl2br($_POST['chkStepSixPaymentMethodCash']);
$strStepSixPaymentMethodCreditCard = nl2br($_POST['chkStepSixPaymentMethodCreditCard']);
$strStepSixAmountToStartBilling = $_POST['txtBillingAmount'];
$strStepSixPaymentMethodPaypal = nl2br($_POST['chkStepSixPaymentMethodPaypal']);
$strStepSixPaymentMethodEmailMoneyTransfer = nl2br($_POST['chkStepSixPaymentMethodEmailMoneyTransfer']);
$strStepSixPaymentDetails = nl2br($_POST['txtStepSixPaymentDetails']);
# static value of 5 has been added. It'll need to be pulled from the auto ID of the table, then +1 to line it up correctly.
$insertSQL = "INSERT INTO tbFindNLdirectory (`iID`, `iBusinessType`, `sContactFullName`, `sContactEmailAddress`, `sContactCompanyPosition`, " .
"`sCompanyBusinessName`, `sCompanyWebsiteAddress`, `sCompanyPhoneNumber`, `sCompanyFaxNumber`, `sCompanyLocation`, `sCompanyProvince`, " .
"`sCompanyCity`, `iCompanyStreetNumber`, `sCompanyStreetAddress`, `sCompanyPostalCode`, `sCompanyLatitude`, `sCompanyLongitude`, " .
"`sCompanyHoursOfOperationMonday`, `sCompanyHoursOfOperationTuesday`, `sCompanyHoursOfOperationWednesday`, `sCompanyHoursOfOperationThursday`, " .
"`sCompanyHoursOfOperationFriday`, `sCompanyHoursOfOperationSaturday`, `sCompanyHoursOfOperationSunday`, `sCompanyWheelchairAccessible`, " .
"`sPaymentTypeVisa`, `sPaymentTypeMastercard`, `sPaymentTypeAmex`, `sPaymentTypeDiners`, `sPaymentTypePaypal`, `sCompanyPaymentTypesOther`, " .
"`sCompanyAcceptDebitCards`, `sCompanyAtmOnSite`, `iDiscountAmount`, `sDiscountItem`, `sDiscountRestrictions`, `sDiscountDescription`, " .
"`sUpgradePhotoOne`, `sUpgradePhotoTwo`, `sUpgradePhotoThree`, `sUpgradePhotoFour`, `sUpgradePhotoFive`, `sDiscount1000words, `sDiscountBacklink`, " .
"`sDiscountInternalLink`, `sPaymentSetupFee`, `sPaymentYearlyFee`, `sPaymentLifetimeListing`, `sDiscountEmployee`, `iDiscountAmountSetupFee`, " .
"`iDiscountAmountYearlyFee`, `iDiscountNumberOfYears`, `sDiscountStartBillingDate`, `sDiscountStartBillingAmount`, `sPaymentMethodCash`, " .
"`sPaymentMethodCreditCard`, `sPaymentMethodCheck`, `sPaymentMethodPaypal`, `sPaymentMethodEmailMoneyTransfer`, `sPaymentDetails`) " .
"VALUES ('5', '5', '" .
$strStepOneFullName . "', '" .
$strStepOneEmailAddress . "', '" .
$strStepOnePositionInCompany . "', '" .
$strStepTwoBusinessName . "', '" .
$strStepTwoWebsiteAddress . "', '" .
$strStepTwoPhoneNumber . "', '" .
$strStepTwoFaxNumber . "', '" .
$strStepTwoStreetNumber . "', '" .
$strStepTwoStreetAddress . "', '" .
$strStepTwoCityTown . "', '" .
$optStepTwoProvince . "', '" .
$intStepTwoLatitude . "', '" .
$intStepTwoLongitude . "', '" .
$strStepTwoHoursOfOperationMonday . "', '" .
$strStepTwoHoursOfOperationTuesday . "', '" .
$strStepTwoHoursOfOperationWednesday . "', '" .
$strStepTwoHoursOfOperationThursday . "', '" .
$strStepTwoHoursOfOperationFriday . "', '" .
$strStepTwoHoursOfOperationSaturday . "', '" .
$strStepTwoHoursOfOperationSunday . "', '" .
$strStepTwoWheelchairAccessible . "', '" .
$strStepTwoPaymentTypeVisa . "', '" .
$strStepTwoPaymentTypeMastercard . "', '" .
$strStepTwoPaymentTypeAmex . "', '" .
$strStepTwoPaymentTypeDiners . "', '" .
$strStepTwoPaymentTypePaypal . "', '" .
$strStepTwoHoursPaymentTypeOther . "', '" .
$strStepTwoAcceptDebitCards . "', '" .
$strStepTwoAtmOnSite . "', '" .
$strStepThreeDiscountAmount . "', '" .
$strStepThreeDiscountItem . "', '" .
$strStepThreeDiscountRestrictions . "', '" .
$strStepThreeDiscountDescription . "', '" .
$target_path . "', '" .
$target_path2 . "', '" .
$target_path3 . "', '" .
$target_path4 . "', '" .
$target_path5 . "', '" .
$strStepFive1000words . "', '" .
$strStepFiveBackLink . "', '" .
$strStepFiveInternalLink . "', '" .
$strStepSixSetupFee . "', '" .
$strStepSixYearlyFee . "', '" .
$strStepSixFreeLifetimeListing . "', '" .
$strStepSixFreeLifetimeListing . "', '" .
$strStepSixEmployee . "', '" .
$strStepSixSetupFee . "', '" .
$strStepSixYearlyFee . "', '" .
$strStepSixNumbersOfDiscountYears . "', '" .
$strStepSixDateToStartBilling . "', '" .
$_POST['txtBillingAmount'] . "', '" .
$strStepSixPaymentMethodPaypal . "', '" .
$strStepSixPaymentMethodEmailMoneyTransfer . "', '" .
$strStepSixPaymentDetails . "')";
echo $insertSQL;
$runInsertSQL = mysql_query($insertSQL, $connDB);
?>
$sql = "SELECT * FROM tbFindNLdirectory ORDER BY iID ASC";
$runSQL = mysql_query($sql, $connDB);
?>
| Business Name |
Add a New Business |
|
|
|
while($display_info = mysql_fetch_array($runSQL)) { ?>
echo $display_info['sCompanyBusinessName']; ?>
|
|
} ?>
The business echo $_POST['txtStepTwoBusinessName'];?> has been added to the FindNL directory. Whoo-hoo. Now comes the stuff like nl2br and validation
of that form via javascript. Just takes a bit of time.
|