Jump to content

cdm30

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

cdm30's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ok i have this form from another website i did.. i copied and need to use it for another project. I'm pulling my hair out about why the body is being sent empty... I get the attachment just fine and it works on the original site just fine. Can anyone see if I'm missing something here? Here's my code: <?php $boolSubmit = false; if ($_GET['quote'] == "true") { $boolSubmit = true; // get form variables $txtName = $_POST['txtName']; $txtCompany = $_POST['txtCompany']; $txtPhone = $_POST['txtPhone']; $txtEmail = $_POST['from_email']; $txtFax = $_POST['txtFax']; $txtWebsite = $_POST['txtWebsite']; $txtAddress = $_POST['txtAddress']; $txtCity = $_POST['txtCity']; $txtState = $_POST['txtState']; $txtZipcode = $_POST['txtZipcode']; $txtProductID = $_POST['txtProductID']; $txtQty = $_POST['txtQty']; $txtMessage = $_POST['txtMessage2']; $to_email = "myemail@gmail.com"; $from_name = $txtName; $attachment = $_FILES['attachment']['tmp_name']; $attachment_name = $_FILES['attachment']['name']; if (is_uploaded_file($attachment)) { $fp = fopen($attachment, "rb"); $data = fread($fp, filesize($attachment)); $data = chunk_split(base64_encode($data)); fclose($fp); } //Email $FromEmail = $txtEmail; $Subject = "my subject"; $strBody = "body headline: \r\n \r\n"; $strBody = $strBody . "Name: $txtName \r\n"; $strBody = $strBody . "Company: $txtCompany \r\n"; $strBody = $strBody . "Phone: $txtPhone \r\n"; $strBody = $strBody . "E-mail: $txtEmail \r\n \r\n"; $strBody = $strBody . "Fax: $txtFax \r\n \r\n"; $strBody = $strBody . "Website: $txtWebsite \r\n \r\n"; $strBody = $strBody . "Address: $txtAddress \r\n \r\n"; $strBody = $strBody . "City: $txtCity \r\n \r\n"; $strBody = $strBody . "State: $txtState \r\n \r\n"; $strBody = $strBody . "Zip Code: $txtZipcode \r\n \r\n"; $strBody = $strBody . "ProductID: $txtProductID \r\n \r\n"; $strBody = $strBody . "Qty: $txtQty \r\n \r\n"; $strBody = $strBody . "--------------------------- \r\n"; $strBody = $strBody . "Message \r\n"; $strBody = $strBody . "$txtMessage \r\n"; $$strBody = $body; $headers = "From: $from_name<" . $_POST['from_email'] . ">\n"; $headers .= "Reply-To: <" . $_POST['from_email'] . ">\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/related; type=\"multipart/alternative\"; boundary=\"----=MIME_BOUNDRY_main_message\"\n"; $headers .= "X-Sender: $from_name<" . $_POST['from_email'] . ">\n"; $headers .= "X-Mailer: PHP4\n"; $headers .= "X-Priority: 3\n"; //1 = Urgent, 3 = Normal $headers .= "Return-Path: <" . $_POST['from_email'] . ">\n"; $headers .= "This is a multi-part message in MIME format.\n"; $headers .= "------=MIME_BOUNDRY_main_message \n"; $headers .= "Content-Type: multipart/alternative; boundary=\"----=MIME_BOUNDRY_message_parts\"\n"; $message = "------=MIME_BOUNDRY_message_parts\n"; $message .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n"; $message .= "Content-Transfer-Encoding: quoted-printable\n"; $message .= "\n"; $message .= "$body\n"; $message .= "\n"; $message .= "------=MIME_BOUNDRY_message_parts--\n"; $message .= "\n"; $message .= "------=MIME_BOUNDRY_main_message\n"; $message .= "Content-Type: application/octet-stream;\n\tname=\"" . $attachment_name . "\"\n"; $message .= "Content-Transfer-Encoding: base64\n"; $message .= "Content-Disposition: attachment;\n\tfilename=\"" . $attachment_name . "\"\n\n"; $message .= $data; //The base64 encoded message $message .= "\n"; $message .= "------=MIME_BOUNDRY_main_message--\n"; mail("$to_name<$to_email>", $Subject, $message, $headers); } ?> Here's my form code if needed: <?php if ($boolSubmit == false) { ?> <div class="container"> <form action="freequote.php?quote=true" method="post" name="form2" enctype="multipart/form-data" onSubmit="YY_checkform('form2','txtName','#q','0','Please enter your name.','txtProductID','#q','0','Please enter a product number.','txtCompany','#q','0','Please enter your company\'s name.','txtQty','#1_10000','1','Please enter a valid quantity.','txtZipcode','#q','0','Please enter a zip code.','from_email','#q','0','Please enter an email address.','txtPhone','#q','0','Please enter a phone number.');return document.MM_returnValue"> <span class="main">For a free quote fill out the form below. </span> <table width="100%" border="0" cellspacing="2" cellpadding="3"> <tr> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-2"><strong>Name</strong></font></td> <td width="180"><font color="#006697" face="Arial, Helvetica, sans-serif" size="-1"> <input name="txtName" type="text" id="txtName"/> </font><font face="Arial, Helvetica, sans-serif" size="-1"><span class="style1">*</span></font></td> <td width="70"><strong><font color="#006697" face="Arial, Helvetica, sans-serif" size="-2">Product # </font></strong></td> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-1"> <input name="txtProductID" type="text" id="txtProductID" size="10" /> <span class="style1">*</span></font></td> </tr> <tr> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-2"><strong>Company</strong></font></td> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-1"> <input name="txtCompany" type="text" id="txtCompany" /> <span class="style1">*</span></font></td> <td><strong><font color="#006697" face="Arial, Helvetica, sans-serif" size="-2">Qty</font></strong></td> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-1"> <input name="txtQty" type="text" id="txtQty" size="10" /> <span class="style1">*</span></font></td> </tr> <tr> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-2"><strong>Phone</strong></font></td> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-1"> <input name="txtPhone" type="text" id="txtPhone" /> <span class="style1">*</span></font></td> <td colspan="2" valign="top"> </td> </tr> <tr> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-2"><strong>E-mail</strong></font></td> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-1"><span class="style1"> <input name="from_email" type="text" id="from_email" onChange="javascript:this.value = this.value.toLowerCase();" /> *</span></font></td> <td colspan="2" valign="top"> </td> </tr> <tr> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-2"><strong>Fax</strong></font></td> <td class="style1"> <input name="txtFax" type="text" id="txtFax" /> </td> <td><strong><font color="#006697" face="Arial, Helvetica, sans-serif" size="-2">Website</font></strong></td> <td valign="top" class="style1"> <input name="txtWebsite" type="text" id="txtWebsite" /> </td> </tr> <tr> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-2"><strong>Address</strong></font></td> <td colspan="3" class="style1"> <input name="txtAddress" type="text" id="txtAddress" size="50" /> </td> </tr> <tr> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-2"><strong>City</strong></font></td> <td colspan="3" class="style1"> <input name="txtCity" type="text" id="txtCity" size="50" /> </td> </tr> <tr> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-2"><strong>State</strong></font></td> <td colspan="3" class="style1"> <select name="txtState" id="txtState" tabindex="11"> <option selected value="_none">[Choose One]</option> <option value="Alabama">Alabama </option> <option value="Alaska">Alaska </option> <option value="Arizona">Arizona </option> <option value="Arkansas">Arkansas </option> <option value="California">California </option> <option value="Colorado">Colorado </option> <option value="Connecticut">Connecticut </option> <option value="8831">Delaware </option> <option value="9130">District of Columbia</option> <option value="Florida">Florida </option> <option value="Georgia">Georgia </option> <option value="Hawaii">Hawaii </option> <option value="Idaho">Idaho </option> <option value="Illinois">Illinois </option> <option value="Indiana">Indiana </option> <option value="Iowa">Iowa </option> <option value="Kansas">Kansas </option> <option value="Kentucky">Kentucky </option> <option value="Louisiana">Louisiana </option> <option value="Maine">Maine </option> <option value="Maryland">Maryland </option> <option value="Massachusetts">Massachusetts</option> <option value="Michigan">Michigan </option> <option value="Minnesota">Minnesota </option> <option value="Mississippi">Mississippi </option> <option value="Missouri">Missouri </option> <option value="Montana">Montana </option> <option value="Nebraska">Nebraska </option> <option value="Nevada">Nevada </option> <option value="New_Hampshire">New Hampshire</option> <option value="New Jersey">New Jersey </option> <option value="New Mexico">New Mexico </option> <option value="New York">New York </option> <option value="North Carolina">North Carolina</option> <option value="North Dakota">North Dakota </option> <option value="Ohio">Ohio </option> <option value="Oklahoma">Oklahoma </option> <option value="Oregon">Oregon </option> <option value="Pennsylvania">Pennsylvania</option> <option value="Rhode Island">Rhode Island </option> <option value="South Carolina">South Carolina </option> <option value="South Dakota">South Dakota </option> <option value="Tennessee">Tennessee </option> <option value="Texas">Texas </option> <option value="Utah">Utah </option> <option value="Vermont">Vermont </option> <option value="Virginia">Virginia </option> <option value="Washington">Washington </option> <option value="West Virginia">West Virginia </option> <option value="Wisconsin">Wisconsin </option> <option value="Wyoming">Wyoming </option></select> </td> </tr> <tr> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-2"><strong>Zip Code</strong></font></td> <td colspan="3" class="style1"> <input name="txtZipcode" type="text" id="txtZipcode" size="24" /> <span class="style1"><font face="Arial, Helvetica, sans-serif" size="-1">*</font></span> <font color="#333333" size="2" face="Arial, Helvetica, sans-serif"><strong><em>Required for Shipping</em></strong></font></td> </tr> <tr> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-2"><strong>Upload Logo </strong></font></td> <td colspan="3"><input type="file" name="attachment" size="40" /></td> </tr> <tr> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-2"><strong>Message</strong></font></td> <td colspan="3"><textarea name="txtMessage2" cols="40" rows="4" id="txtMessage2"></textarea></td> </tr> <tr> <td><font color="#006697" face="Arial, Helvetica, sans-serif" size="-2"><strong>Submit</strong></font></td> <td><input type="hidden" name="MAX_FILE_SIZE" value="10000000" /> <input type="submit" name="Submit" value="Submit Form" /></td> <td> </td> <td> </td> </tr> <tr> <td colspan="5"><span class="style1"><font face="Arial, Helvetica, sans-serif" size="-1">*</font></span> <font color="#333333" face="Arial, Helvetica, sans-serif" size="-1"><strong><em>Required Fields.</em></strong></font></td> </tr> </table> </form> <?php } else { ?> <div class="container"><br> <span class="main">Thank you for your submission.</span></div> <?php } ?> </div>
  2. HAHAHA for some reason saying "a lot" and "you're" properly make me feel whole
  3. Thank you both so much!! MJDAMATO you're awesome.. I have enough to learn from, thank you!!
  4. The message sends fine. Its just a long form and the client wants to exclude fields that are empty from being sent to his email. I guess I'm not understanding your advice, sorry :/
  5. Could you show me an example? What I know of the empty function is like this: if(empty($username)) { echo "This variable is empty"; } else { echo "This variable is not empty"; } I have no idea how to use that to include in the email body or not.. I'm sorry. I want to learn but not sure where to start..
  6. Hi, I searched and couldn't find a previous solution.. I'm supposed to take this existing long form and tweak it so it excludes empty fields when emailed.. Can anyone show me what would work for this code below? Any help would be greatly appreciated.. Sorry for the long code, i didn't know where to cut it off.. <?php $EmailTo = Trim(stripslashes($_POST['EmailTo'])); $EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); $Subject = ""; // terms $terms_conditions_details = Trim(stripslashes($_POST['terms_conditions_details'])); // contact information $full_name = Trim(stripslashes($_POST['full_name'])); $title = Trim(stripslashes($_POST['title'])); $company = Trim(stripslashes($_POST['company'])); $billing_address = Trim(stripslashes($_POST['billing_address'])); $billing_city = Trim(stripslashes($_POST['billing_city'])); $billing_state = Trim(stripslashes($_POST['billing_state'])); $billing_zip = Trim(stripslashes($_POST['billing_zip'])); $phone = Trim(stripslashes($_POST['phone'])); $alt_phone = Trim(stripslashes($_POST['alt_phone'])); $how_did_you_hear = Trim(stripslashes($_POST['how_did_you_hear'])); // event information $event_date = Trim(stripslashes($_POST['event_date'])); $guests = Trim(stripslashes($_POST['guests'])); $event_start_time = Trim(stripslashes($_POST['event_start_time'])); $event_end_time = Trim(stripslashes($_POST['event_end_time'])); $event_address = Trim(stripslashes($_POST['event_address'])); $event_city = Trim(stripslashes($_POST['event_city'])); $event_state = Trim(stripslashes($_POST['event_state'])); $event_zip = Trim(stripslashes($_POST['event_zip'])); $event_type = Trim(stripslashes($_POST['event_type'])); $event_type_other = Trim(stripslashes($_POST['event_type_other'])); $event_theme = Trim(stripslashes($_POST['event_theme'])); $special_requests = Trim(stripslashes($_POST['special_requests'])); $budget = Trim(stripslashes($_POST['budget'])); $service_type = Trim(stripslashes($_POST['service_type'])); // wings & wingers $grilled_wings = Trim(stripslashes($_POST['grilled_wings'])); $buffalo_wings = Trim(stripslashes($_POST['buffalo_wings'])); $wingers = Trim(stripslashes($_POST['wingers'])); $wing_sauces1 = Trim(stripslashes($_POST['wing_sauces1'])); $wing_sauces2 = Trim(stripslashes($_POST['wing_sauces2'])); $wing_sauces3 = Trim(stripslashes($_POST['wing_sauces3'])); $wing_sauces4 = Trim(stripslashes($_POST['wing_sauces4'])); $wing_sauces5 = Trim(stripslashes($_POST['wing_sauces5'])); $wing_sauces6 = Trim(stripslashes($_POST['wing_sauces6'])); $wing_sauces7 = Trim(stripslashes($_POST['wing_sauces7'])); $wing_sauces8 = Trim(stripslashes($_POST['wing_sauces8'])); $wing_sauces9 = Trim(stripslashes($_POST['wing_sauces9'])); $wing_sauces10 = Trim(stripslashes($_POST['wing_sauces10'])); $wing_sauces11 = Trim(stripslashes($_POST['wing_sauces11'])); $wing_sauces12 = Trim(stripslashes($_POST['wing_sauces12'])); $wing_sauces13 = Trim(stripslashes($_POST['wing_sauces13'])); $wing_sauces14 = Trim(stripslashes($_POST['wing_sauces14'])); // party platters $chicken_finger_platter = Trim(stripslashes($_POST['chicken_finger_platter'])); $chicken_nugget_platter = Trim(stripslashes($_POST['chicken_nugget_platter'])); $chicken_wing_platter = Trim(stripslashes($_POST['chicken_wing_platter'])); // salads $caesar_salad = Trim(stripslashes($_POST['caesar_salad'])); $house_salad = Trim(stripslashes($_POST['house_salad'])); $cobb_salad = Trim(stripslashes($_POST['cobb_salad'])); $sea_breeze_salad = Trim(stripslashes($_POST['sea_breeze_salad'])); // appetizers $fresh_fruit_platter = Trim(stripslashes($_POST['fresh_fruit_platter'])); $chilled_vegetable_platter = Trim(stripslashes($_POST['chilled_vegetable_platter'])); $cocktail_shrimp = Trim(stripslashes($_POST['cocktail_shrimp'])); $tailgate_chips_platter = Trim(stripslashes($_POST['tailgate_chips_platter'])); $chips_and_salsa = Trim(stripslashes($_POST['chips_and_salsa'])); $spinach_artichoke_dip_platter = Trim(stripslashes($_POST['spinach_artichoke_dip_platter'])); $quesadilla_platter = Trim(stripslashes($_POST['quesadilla_platter'])); // entrees $bbq_ribs_platter = Trim(stripslashes($_POST['bbq_ribs_platter'])); $hawaiian_chicken = Trim(stripslashes($_POST['hawaiian_chicken'])); $mahi_over_rice = Trim(stripslashes($_POST['mahi_over_rice'])); // sandwiches $gourmet_slider_platter = Trim(stripslashes($_POST['gourmet_slider_platter'])); $mini_cheeseburger_platter = Trim(stripslashes($_POST['mini_cheeseburger_platter'])); $club_sandwich_platter = Trim(stripslashes($_POST['club_sandwich_platter'])); $turkey_wrap_platter = Trim(stripslashes($_POST['turkey_wrap_platter'])); $philly_cheese_platter = Trim(stripslashes($_POST['philly_cheese_platter'])); // dessert $chocolate_brownie_platter = Trim(stripslashes($_POST['chocolate_brownie_platter'])); $apple_crisp = Trim(stripslashes($_POST['apple_crisp'])); $mini_gourmet_cheesecakes = Trim(stripslashes($_POST['mini_gourmet_cheesecakes'])); //$10 meal deal $meal_deal_wings = Trim(stripslashes($_POST['meal_deal_wings'])); $meal_deal_grilled_chicken = Trim(stripslashes($_POST['meal_deal_grilled_chicken'])); $meal_deal_burger = Trim(stripslashes($_POST['meal_deal_burger'])); $meal_deal_lemonade = Trim(stripslashes($_POST['meal_deal_lemonade'])); $meal_deal_iced_tea = Trim(stripslashes($_POST['meal_deal_iced_tea'])); $meal_deal_sauces1 = Trim(stripslashes($_POST['meal_deal_sauces1'])); $meal_deal_sauces2 = Trim(stripslashes($_POST['meal_deal_sauces2'])); $meal_deal_sauces3 = Trim(stripslashes($_POST['meal_deal_sauces3'])); $meal_deal_sauces4 = Trim(stripslashes($_POST['meal_deal_sauces4'])); $meal_deal_sauces5 = Trim(stripslashes($_POST['meal_deal_sauces5'])); $meal_deal_sauces6 = Trim(stripslashes($_POST['meal_deal_sauces6'])); $meal_deal_sauces7 = Trim(stripslashes($_POST['meal_deal_sauces7'])); $meal_deal_sauces8 = Trim(stripslashes($_POST['meal_deal_sauces8'])); $meal_deal_sauces9 = Trim(stripslashes($_POST['meal_deal_sauces9'])); $meal_deal_sauces10 = Trim(stripslashes($_POST['meal_deal_sauces10'])); $meal_deal_sauces11 = Trim(stripslashes($_POST['meal_deal_sauces11'])); $meal_deal_sauces12 = Trim(stripslashes($_POST['meal_deal_sauces12'])); $meal_deal_sauces13 = Trim(stripslashes($_POST['meal_deal_sauces13'])); $meal_deal_sauces14 = Trim(stripslashes($_POST['meal_deal_sauces14'])); // box lunches $box_turkey_ruben = Trim(stripslashes($_POST['box_turkey_ruben'])); $box_blt_on_ciabatta = Trim(stripslashes($_POST['box_blt_on_ciabatta'])); $box_club = Trim(stripslashes($_POST['box_club'])); $box_ham_and_cheese = Trim(stripslashes($_POST['box_ham_and_cheese'])); $box_chipolte_shrimp_blt = Trim(stripslashes($_POST['box_chipolte_shrimp_blt'])); $box_turkey_bacon_ranch = Trim(stripslashes($_POST['box_turkey_bacon_ranch'])); $box_buffalo_chicken = Trim(stripslashes($_POST['box_buffalo_chicken'])); $box_veggie = Trim(stripslashes($_POST['box_veggie'])); $box_caesar_salad = Trim(stripslashes($_POST['box_caesar_salad'])); $box_house_salad = Trim(stripslashes($_POST['box_house_salad'])); $box_cobb_salad = Trim(stripslashes($_POST['box_cobb_salad'])); $box_sea_breeze_salad = Trim(stripslashes($_POST['box_sea_breeze_salad'])); // full service catering $theme_package = Trim(stripslashes($_POST['theme_package'])); $theme_package_information = Trim(stripslashes($_POST['theme_package_information'])); $reception = Trim(stripslashes($_POST['reception'])); $reception_information = Trim(stripslashes($_POST['reception_information'])); $specialty_stations = Trim(stripslashes($_POST['specialty_stations'])); $bar_beverage_service = Trim(stripslashes($_POST['bar_beverage_service'])); $bar_beverage_service_information = Trim(stripslashes($_POST['bar_beverage_service_information'])); $breakfast = Trim(stripslashes($_POST['breakfast'])); $breakfast_information = Trim(stripslashes($_POST['breakfast_information'])); $notes = Trim(stripslashes($_POST['notes'])); // payment $payment1 = Trim(stripslashes($_POST['payment1'])); $payment2 = Trim(stripslashes($_POST['payment2'])); $payment3 = Trim(stripslashes($_POST['payment3'])); $payment4 = Trim(stripslashes($_POST['payment4'])); $payment5 = Trim(stripslashes($_POST['payment5'])); $payment6 = Trim(stripslashes($_POST['payment6'])); // confirmation email $confirmation_subject = ""; $confirmation_body = "$full_name,\n\n Thank you for emailing us. A catering manager from your location will get in touch with you shortly.\n\n \n \n"; $Body = ""; $Body .= "CONTACT INFORMATION\n"; $Body .= "\nFull Name: "; $Body .= $full_name; $Body .= "\nTitle: "; $Body .= $title; $Body .= "\nCompany: "; $Body .= $company; $Body .= "\nBilling Address: "; $Body .= $billing_address; $Body .= ", "; $Body .= $billing_city; $Body .= ", "; $Body .= $billing_state; $Body .= ", "; $Body .= $billing_zip; $Body .= "\nPhone: "; $Body .= $phone; $Body .= "\nAlternate Phone: "; $Body .= $alt_phone; $Body .= "\nHow did you hear about us?: "; $Body .= $how_did_you_hear; $Body .= "\n"; $Body .= $terms_conditions_details; $Body .= "\n\nEVENT INFORMATION\n"; $Body .= "\nEvent Date: "; $Body .= $event_date; $Body .= "\nNumber of Guests: "; $Body .= $guests; $Body .= "\nEvent Start Time: "; $Body .= $event_start_time; $Body .= "\nEvent End Time: "; $Body .= $event_end_time; $Body .= "\nEvent Address: "; $Body .= $event_address; $Body .= ", "; $Body .= $event_city; $Body .= ", "; $Body .= $event_state; $Body .= ", "; $Body .= $event_zip; $Body .= "\nType of Event: "; $Body .= $event_type; $Body .= "\nType of Event: Other: "; $Body .= $event_type_other; $Body .= "\nEvent Theme: "; $Body .= $event_theme; $Body .= "\nSpecial Requests: "; $Body .= $special_requests; $Body .= "\nBudget: "; $Body .= $budget; $Body .= "\nType of Service: "; $Body .= $service_type; $Body .= "\n\nWINGS & WINGERS\n"; $Body .= "\nGrilled Wings: "; $Body .= $grilled_wings; $Body .= "\nBuffalo Wings: "; $Body .= $buffalo_wings; $Body .= "\nWingers: "; $Body .= $wingers; $Body .= "\nWing Sauces: "; $Body .= "$wing_sauces1, $wing_sauces2, $wing_sauces3, $wing_sauces4, $wing_sauces5, $wing_sauces6, $wing_sauces7, $wing_sauces8, $wing_sauces9, $wing_sauces10, $wing_sauces11, $wing_sauces12, $wing_sauces13, $wing_sauces14"; $Body .= "\n\nPARTY PLATTERS\n"; $Body .= "\nChicken Finger Platter: "; $Body .= $chicken_finger_platter; $Body .= "\nChicken Nugget Platter: "; $Body .= $chicken_nugget_platter; $Body .= "\nChicken Wing Platter: "; $Body .= $chicken_wing_platter; $Body .= "\n\nSALADS\n"; $Body .= "\nCaesar Salad: "; $Body .= $caesar_salad; $Body .= "\nHouse Salad: "; $Body .= $house_salad; $Body .= "\nCobb Salad: "; $Body .= $cobb_salad; $Body .= "\nSea Breeze Salad: "; $Body .= $sea_breeze_salad; $Body .= "\n\nAPPETIZERS\n"; $Body .= "\nFresh Fruit Platter: "; $Body .= $fresh_fruit_platter; $Body .= "\nChilled Vegetable Platter: "; $Body .= $chilled_vegetable_platter; $Body .= "\nCocktail Shrimp: "; $Body .= $cocktail_shrimp; $Body .= "\nTailgate Chips Platter: "; $Body .= $tailgate_chips_platter; $Body .= "\nChips and Salsa: "; $Body .= $chips_and_salsa; $Body .= "\nSpinach Artichoke Dip Platter: "; $Body .= $spinach_artichoke_dip_platter; $Body .= "\nQuesadilla Platter: "; $Body .= $quesadilla_platter; $Body .= "\n\nENTREES\n"; $Body .= "\nBBQ Ribs Platter: "; $Body .= $bbq_ribs_platter; $Body .= "\nHawaiian Chicken: "; $Body .= $hawaiian_chicken; $Body .= "\nMahi Over Rice: "; $Body .= $mahi_over_rice; $Body .= "\n\nSANDWICHES\n"; $Body .= "\nGourmet Slider Platter: "; $Body .= $gourmet_slider_platter; $Body .= "\nMini Cheeseburger Platter: "; $Body .= $mini_cheeseburger_platter; $Body .= "\nClub Sandwich Platter: "; $Body .= $club_sandwich_platter; $Body .= "\nTurkey Wrap Platter: "; $Body .= $turkey_wrap_platter; $Body .= "\nPhilly Cheese Platter: "; $Body .= $philly_cheese_platter; $Body .= "\n\nDESSERT\n"; $Body .= "\nChocolate Brownie Platter: "; $Body .= $chocolate_brownie_platter; $Body .= "\nApple Crisp: "; $Body .= $apple_crisp; $Body .= "\nMini Gourmet Cheesecakes: "; $Body .= $mini_gourmet_cheesecakes; $Body .= "\n\n$10 MEAL DEAL\n"; $Body .= "\nWings: "; $Body .= $meal_deal_wings; $Body .= "\nGrilled Chicken Breast: "; $Body .= $meal_deal_grilled_chicken; $Body .= "\nBurger: "; $Body .= $meal_deal_burger; $Body .= "\nLemonade: "; $Body .= $meal_deal_lemonade; $Body .= "\nIced Tea: "; $Body .= $meal_deal_iced_tea; $Body .= "\nWing Sauces: "; $Body .= "\n\nBOX LUNCHES\n"; $Body .= "\nSandwiches"; $Body .= "\nTurkey Ruben: "; $Body .= $box_turkey_ruben; $Body .= "\nBLT on Ciabatta Bread: "; $Body .= $box_blt_on_ciabatta; $Body .= "\nClub: "; $Body .= $box_club; $Body .= "\nHam and Cheese: "; $Body .= $box_ham_and_cheese; $Body .= "\n\nWraps"; $Body .= "\nChipolte Shrimp BLT: "; $Body .= $box_chipolte_shrimp_blt; $Body .= "\nTurkey Bacon Ranch: "; $Body .= $box_turkey_bacon_ranch; $Body .= "\nBuffalo Chicken: "; $Body .= $box_buffalo_chicken; $Body .= "\nVeggie: "; $Body .= $box_veggie; $Body .= "\n\nSalad"; $Body .= "\nCaesar Salad: "; $Body .= $box_caesar_salad; $Body .= "\nHouse Salad: "; $Body .= $box_house_salad; $Body .= "\nCobb Salad: "; $Body .= $box_cobb_salad; $Body .= "\nSea Breeze Salad: "; $Body .= $box_sea_breeze_salad; $Body .= "\n\nFULL SERVICE CATERING\n"; $Body .= "\nTheme Package: "; $Body .= $theme_package; $Body .= "\nInformation: "; $Body .= $theme_package_information; $Body .= "\nReception: "; $Body .= $reception; $Body .= "\nInformation: "; $Body .= $reception_information; $Body .= "\nSpecialty Stations: "; $Body .= $specialty_stations; $Body .= "\nBar/Beverage Service: "; $Body .= $bar_beverage_service; $Body .= "\nInformation: "; $Body .= $bar_beverage_service_information; $Body .= "\nBreakfast: "; $Body .= $breakfast; $Body .= "\nInformation: "; $Body .= $breakfast_information; $Body .= "\nNotes: "; $Body .= $notes; $Body .= "\n\nPAYMENT TYPE\n"; $Body .= "$payment1, $payment2, $payment3, $payment4, $payment5, $payment6"; $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>") && mail($EmailFrom, $confirmation_subject, $confirmation_body, "From: <$EmailTo>");
  7. Thanks guys for the info.. Muddy_Funster I used your code and added session start to top like others mentioned, I've also kept Hello < /? php echo $_SESSION['name']; ? /> in the body where I want it to display. But it's still not working... here's the top of the page now: <?PHP session_start(); require_once("./include/membersite_config.php"); if(!$fgmembersite->CheckLogin()) { $fgmembersite->RedirectToURL("login.php"); exit; } if (isset($_SESSION['name'])){ $name = $_SESSION['name']; echo "Hello $name"; } ?> membersite_config.php is where the database connection info is stored. And all the session info regarding input and login username password etc is in a page called fg_membersite.php. Might be a dumb question but shouldn't this page be in my welcome.php script some where? Since this is teh page with session variables? I don't know though since everything else works fine.. CK9 I'd love to see what you've done on your own site, thank you!
  8. Hi there, New to the forum... thank you in advance for any help! I created a login system using a tutorial found online. Everything works perfectly.. but now the client wants "Hello [First Name]" displayed after logging in. I've tried about 12 different tutorials at this point and can't seem to tweak them enough to work with my code. A lot of the tutorials have session_start(); at the top of their protected (welcome.php) page. But mine seems to be held in a variable in another script and the top of my welcome.php looks like this: <?PHP require_once("./include/membersite_config.php"); if(!$fgmembersite->CheckLogin()) { $fgmembersite->RedirectToURL("login.php"); exit; } ?> This is what I have on my welcome page as well but I don't know how to make this all come together and work.. Hello <?php echo $_SESSION['name']; ?> I'm using mySQL 5.0, and php 5.2. Will anyone shed light on this for me? I'll provide any other info you may need.. Thank you
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.