Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    New Coder
    Join Date
    Aug 2011
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts

    need a help with checkbox menu

    my html code
    <tr>
    <td width="170" height="177" valign="bottom" align="center">
    <input type="CHECKBOX" name="BusinessCards[]" value="BusinessCards"><img src="images/form-businesscards.jpg" border="0" alt=" /">
    </td>
    <td width="10"></td>
    <td width="170" height="177" valign="bottom" align="center">
    <input type="CHECKBOX" name="Brochures[]" value="Brochures"><img src="images/form-brochures.jpg" border="0" alt=" /">
    </td>
    <td width="10"></td>
    <td width="170" height="177" valign="bottom" align="center">
    <input type="CHECKBOX" name="FlyerDesign[]" value="FlyerDesign"><img src="images/form-flyer-design.jpg".jpg" border="0" alt=" /">
    </td>
    <td width="10"></td>
    <td width="170" height="177" valign="bottom" align="center">
    <input type="CHECKBOX" name="LogoDesign"><img src="images/form-logo-design.jpg".jpg" border="0" alt=" /">
    </td>
    </tr>


    <tr><td width="750" height="20" colspan="7"></td></tr>


    <tr>
    <td width="170" height="30" valign="center" align="center" style="font-size:17px; background-color:#cccccc; color:#000000; font-family:Futura, Arial, sans-serif" background="images/portfolio-bgC.jpg">
    Page Layout
    </td>
    <td width="10"></td>
    <td width="170" height="30" valign="center" align="center" style="font-size:17px; background-color:#cccccc; color:#000000; font-family:Futura, Arial, sans-serif" background="images/portfoliobgSky.jpg">
    Poster Design
    </td>
    <td width="10"></td>
    <td width="170" height="30" valign="center" align="center" style="font-size:17px; background-color:#cccccc; color:#ffffff; font-family:Futura, Arial, sans-serif" background="images/portfoliobgSky.jpg">
    Videography</td>
    <td width="10"></td>
    <td width="170" height="30" valign="center" align="center" style="font-size:17px; background-color:#cccccc; color:#000000; font-family:Futura, Arial, sans-serif" background="images/portfolio-bgGold.jpg">
    T Shirt Design
    </td>
    </tr>

    <tr>
    <td width="170" height="177" valign="bottom" align="center"><input type="CHECKBOX" name="PageLayout[]" value="PageLayout">
    <img src="images/form-page-layout.jpg" width="170" height="177" alt="page layout"></td>
    <td width="10"></td>
    <td width="170" height="177" valign="bottom" align="center"><input type="CHECKBOX" name="PosterDesign[]" value="PosterDesign">
    <img src="images/form-poster-design.jpg" width="170" height="177" alt="poster design"></td>
    <td width="10"></td>
    <td width="170" height="177" valign="bottom" align="center">
    <input type="CHECKBOX" name="Videography[]" value="Videography"><img src="images/form-Videography.jpg" width="170" height="177" alt="Videography"></td>
    <td width="10"></td>
    <td width="170" height="177" valign="bottom" align="center">
    <input type="CHECKBOX" name="TShirtDesign[]" value="TShirtDesign"><img src="images/form-tshirt-design.jpg" width="170" height="177" alt="Tshirt design"></td>
    </tr>


    <tr><td width="750" height="20" colspan="7"></td></tr>


    <tr>
    <td width="170" height="30" valign="center" align="center" style="font-size:17px; background-color:#cccccc; color:#ffffff; font-family:Futura, Arial, sans-serif" background="images/portfolio-bgP.jpg">
    Media Commercial
    </td>
    <td width="10"></td>
    <td width="170" height="30" valign="center" align="center" style="font-size:17px; background-color:#cccccc; color:#ffffff; font-family:Futura, Arial, sans-serif" background="images/portfoli-bgB.jpg">
    Web Design
    </td>
    <td width="10"></td>
    <td width="170" height="30" valign="center" align="center" style="font-size:17px; background-color:#cccccc; color:#000000; font-family:Futura, Arial, sans-serif" background="images/portfolio-bgC.jpg">
    Photography
    </td>
    <td width="10"></td>
    <td width="170" height="30" valign="center" align="center" style="font-size:17px; background-color:#cccccc; color:#ffffff; font-family:Futura, Arial, sans-serif" background="images/portfoliobgM.jpg">
    SEO
    </td>
    </tr>

    <tr>
    <td width="170" height="177" valign="bottom" align="center">
    <input type="CHECKBOX" name="RandomDesign[]" value="RandomDesign"><img src="images/form-MediaCommercial .jpg" width="170" height="177" alt="Media Commercial"></td>
    <td width="10"></td>
    <td width="170" height="177" valign="bottom" align="center">
    <input type="CHECKBOX" name="WebDesign[]" value="WebDesign"><img src="images/form-web-design.jpg" width="170" height="177" alt="Web Design"></td>
    <td width="10"></td>
    <td width="170" height="177" valign="bottom" align="center">
    <input type="CHECKBOX" name="Photography[]" value="Photography"><img src="images/form-photography.jpg" width="170" height="177" alt="Photography"></td>
    <td width="10"></td>
    <td width="170" height="177" valign="bottom" align="center">
    <input type="CHECKBOX" name="SEO[]" value="SEO"><img src="images/form-SEO.jpg" width="170" height="177" alt="SEO"></td>
    </tr>




    And my php code


    <?php

    // EDIT THE 2 LINES BELOW AS REQUIRED
    $email_to = "mursallotest@msn.com";
    $email_subject = "Hello";


    function died($error) {
    // your error code can go here
    echo "We are very sorry, but there were error(s) found with the form you submitted. ";
    echo "These errors appear below.<br /><br />";
    echo $error."<br /><br />";
    echo "Please go back and fix these errors.<br /><br />";
    die();
    }


    $first_name = $_POST['FirstName']; // required
    $last_name = $_POST['LastName']; // required
    $city = $_POST['City']; // required
    $state = $_POST['State']; // required
    $o = $_POST['O']; // required
    $q = $_POST['Q']; // required
    $n_s = $_POST['NS']; // required
    $n_b = $_POST['NB']; // required
    $m = $_POST['M']; // required
    $b_c = $_POST['BC']; // required
    $p_i = $_POST['PI']; // required
    $s = $_POST['S']; // required
    $a = $_POST['A']; // required
    $n_l = $_POST['NL']; // required

    $postal_code = $_POST['Postalcode']; // required
    $email_address = $_POST['EmailAddress']; // required
    $work_phone = $_POST['WorkPhone']; // not required
    $mobile_phone = $_POST['MobilePhone']; // required

    $business_cards = $_POST['BusinessCards']; // required
    $brochures = $_POST['Brochures']; // required
    $flyer_design = $_POST['FlyerDesigne']; // not required
    $logo_design = $_POST['LogoDesign']; // required
    $page_layout = $_POST['PageLayout']; // required
    $poster_design = $_POST['PosterDesign']; // required
    $videography = $_POST['Videography']; // not required
    $tshirt_design = $_POST['TShirtDesign']; // required
    $random_design = $_POST['RandomDesign']; // required
    $web_design = $_POST['Web Design']; // required
    $photography = $_POST['Photography']; // not required
    $seo = $_POST['SEO']; // required
    $personal_commercial = $_POST['PersonalCommercial']; // required
    $completed_by = $_POST['CompletedBy']; // required
    $referral = $_POST['Referral']; // not required
    $comments = $_POST['Your_Message'];


    $error_message = "";
    $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
    if(!preg_match($email_exp,$email_address)) {
    $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
    }
    $string_exp = "/^[A-Za-z .'-]+$/";
    if(!preg_match($string_exp,$first_name)) {
    $error_message .= 'The First Name you entered does not appear to be valid.<br />';
    }
    if(!preg_match($string_exp,$last_name)) {
    $error_message .= 'The Last Name you entered does not appear to be valid.<br />';
    }
    if(strlen($comments) < 2) {
    $error_message .= 'The Comments you entered do not appear to be valid.<br />';
    }
    if(strlen($error_message) > 0) {
    died($error_message);
    }
    $email_message = "Form details below.\n\n";

    function clean_string($string) {
    $bad = array("content-type","bcc:","to:","cc:","href");
    return str_replace($bad,"",$string);
    }

    $email_message .= "First Name: ".clean_string($first_name)."\n";
    $email_message .= "Last Name: ".clean_string($last_name)."\n";
    $email_message .= "City: ".clean_string($city)."\n";
    $email_message .= "State: ".clean_string($state)."\n";
    $email_message .= "Ontario: ".clean_string($o)."\n";
    $email_message .= "Quebec: ".clean_string($q)."\n";
    $email_message .= "Nova Scotia: ".clean_string($n_s)."\n";
    $email_message .= "New Brunswick: ".clean_string($n_b)."\n";
    $email_message .= "Manitoba: ".clean_string($m)."\n";
    $email_message .= "British Columbia: ".clean_string($b_c)."\n";
    $email_message .= "Prince Edward Island: ".clean_string($p_i)."\n";
    $email_message .= "Saskatchewan: ".clean_string($s)."\n";
    $email_message .= "Alberta: ".clean_string($a)."\n";
    $email_message .= "Newfoundland and Labrador:".clean_string($n_l)."\n";
    $email_message .= "Postal Code: ".clean_string($postal_code)."\n";
    $email_message .= "Email Address: ".clean_string($email_address)."\n";
    $email_message .= "Work Phone: ".clean_string($work_phone)."\n";
    $email_message .= "Mobile Phone: ".clean_string($mobile_phone)."\n";


    $email_message .= "Business Cards: ".clean_string($business_cards)."\n";
    $email_message .= "Brochures: ".clean_string($brochures)."\n";
    $email_message .= "Flyer Design: ".clean_string($flyer_design)."\n";
    $email_message .= "logo Design: ".clean_string($logo_design)."\n";
    $email_message .= "Page Layout: ".clean_string($page_layout)."\n";
    $email_message .= "Poster Design: ".clean_string($poster_design)."\n";
    $email_message .= "Videography: ".clean_string($videography)."\n";
    $email_message .= "TShirt Design: ".clean_string($tshirt_design)."\n";
    $email_message .= "Random Design: ".clean_string($random_design)."\n";
    $email_message .= "Web Design: ".clean_string($web_design)."\n";
    $email_message .= "Photography: ".clean_string($photography)."\n";
    $email_message .= "SEO: ".clean_string($seo)."\n";


    $email_message .= "Personal Commercial: ".clean_string($personal_commercial)."\n";
    $email_message .= "Completed By: ".clean_string($completed_by)."\n";
    $email_message .= "Referral: ".clean_string($referral)."\n";
    $email_message .= "Comments: ".clean_string($comments)."\n";


    // create email headers
    $headers = 'From: '.$email_from."\r\n".
    'Reply-To: '.$email_from."\r\n" .
    'X-Mailer: PHP/' . phpversion();
    @mail($email_to, $email_subject, $email_message, $headers);
    ?>

    <!-- include your own success html here -->

    Thank you for contacting us. We will be in touch with you very soon.



    <?php

    ?>


    Iam getting email with all checkboxes name dont know why even tho when I check only one in the form but I get email it shows all of them....can someone please tell me what i have done wrong here ....thanks
    Last edited by mursallo; 08-21-2011 at 06:29 PM.

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,502
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    Copy one of those emails to a text file and show it to us.
    I want to see what you mean by "it's showing you all checkboxes".



    .

  • #3
    New Coder
    Join Date
    Aug 2011
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Form details below.

    First Name: john
    Last Name: edward
    City: toronto
    State: O
    Ontario:
    Quebec:
    Nova Scotia:
    New Brunswick:
    Manitoba:
    British Columbia:
    Prince Edward Island:
    Saskatchewan:
    Alberta:
    Newfoundland and Labrador:
    Postal Code: m3c1e6
    Email Address: mursallo@msn.com
    Work Phone: 4168529632
    Mobile Phone: 4162583692
    Business Cards:
    Brochures: Array THIS IS WHAT I GET ARRAY AND BELOW OTHER CHECKBOX NAMES
    Flyer Design:
    logo Design:
    Page Layout:
    Poster Design:
    Videography:
    TShirt Design:
    Random Design:
    Web Design:
    Photography:
    SEO:
    Personal Commercial: commercial
    Completed By: 1 month
    Referral: google
    Comments: Just testing the email thank you ....



    i ONLY CHECK THE Brochures AND i GET ALL OTHER CHECKBOXES NAME....
    check the form link http://www.mxstudio.ca/requestquote.html

    Iam also getting my province name listed all of them I don't what i done wrong here

    Here is my HTML FULL CODE FOR THE PROVINCE SECTION.......


    <tr>
    <td wiidth="360" height="35" valign="center" align="left" style="font-size:16px; padding-right:8px;">Province<font color="#CC3300">*</font>
    </td>
    <td wiidth="360" height="35" valign="center" align="left" style="font-size:16px; padding-right:8px;">

    <select name="State">
    <option value="O">Ontario</option>
    <option value="Q">Quebec</option>
    <option value="NS">Nova Scotia</option>
    <option value="NB">New Brunswick</option>
    <option value="M">Manitoba</option>
    <option value="BC">British Columbia</option>
    <option value="PI">Prince Edward Island</option>
    <option value="S">Saskatchewan</option>
    <option value="A">Alberta</option>
    <option value="NL">Newfoundland and Labrador</option>



    </select>

    </td>
    </tr>
    Last edited by mursallo; 08-21-2011 at 07:29 PM.

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    I don't think this is what you want your HTML to be. Seems to me like the intent is to choose which items to create yes? Like a choice of services?
    For this type, you would retain the same name for all of your checkboxes (ie: item[]). You then specify the value that you want that checkbox to represent, and if selected it will be available in the $_POST['item'] array. Note that checkboxes are one of the only fields that will only be passed if at least one was selected, it otherwise is optional by the browser. The real pro to this is you can simply implode the options with an $services = isset($_POST['item']) && is_array($_POST['item']) ? implode(', ', $_POST['item']) : ''; which would result in if I selected BusinessCards and TShirtDesign a result of BusinessCards, TShirtDesign. You can also use a urlencoded value to retain spaces if you like (%20).

    As for the provinces, you only need to select what is in the 'State' section of the $_POST. These are select options without a multiple option set. So you can only ever have one; $_POST['State'] if Saskatchewan is selected will return 'S'. I'd actually recommend you use a more normalized approach with this, and use the actual provincial abbreviations.

    In the future, wrap all of your code in [php][/php] or [code][/code] tags to preserve the format of the code.

  • #5
    New Coder
    Join Date
    Aug 2011
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts
    wow you guyz are so quick in answer nice like that ....best forum for very quick reply thanks..okay Fou_Lu I didn't get you proper do you mind giving me some example of one or two code and so i can see how u did it....cuz iam new in this php contact form... so iam little bit slow sorry for that.....i precaite your help tho.....thanks

    Mursallo
    Last edited by mursallo; 08-21-2011 at 08:15 PM.

  • #6
    New Coder
    Join Date
    Aug 2011
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts
    wow THANKS FOU-LU I GOT MY PROVINCE SECTION BETTER NOW THANKS FOR YOUR HELP ....NOW I ONLY NEED A HELP IN CHECKBOX SECTION....TAKE A LOOK BELOW THE EMAIL TEXT I GOT FOR THE FORM....


    Form details below.

    First Name: mursallo
    Last Name: john
    City: toronto
    State: Quebec
    Postal Code: m3c1c7
    Email Address: mursallo@msn.com
    Work Phone: 4162586325
    Mobile Phone: 4165287412
    Business Cards:
    Brochures: Array
    Flyer Design:
    logo Design:
    Page Layout:
    Poster Design:
    Videography:
    TShirt Design:
    Random Design:
    Web Design:
    Photography:
    SEO:
    Personal Commercial: commercial
    Completed By: 1 month
    Referral: google
    Comments: just testing thank you...

  • #7
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    For an html, we'll keep this simple:
    Code:
    <input type="checkbox" name="services[]" value="Business%20Cards" />
    <input type="checkbox" name="services[]" value="Flyer%20Design" />
    <input type="checkbox" name="services[]" value="Logo%20Design" />
    <input type="checkbox" name="services[]" value="Page%20Layout" />
    ....
    Where in PHP, assume that the method was post:
    PHP Code:
    $sChecked = isset($_POST['services']) && is_array($_POST['services']) ? implode(', '$_POST['services']) : '';
    printf("You have selected the following services: %s"$sChecked); 
    Nice and simple.

    Edit:
    Oh btw, you can apply your clean_string function to every item in the array using $_POST['services'] = array_map('clean_string', $_POST['services']);. So to keep it nice, you'll want to skip the ternary:
    PHP Code:
    if (isset($_POST['services']) && is_array($_POST['services']))
    {
        
    $aServices array_map('clean_string'$_POST['services']);
        
    $sServices implode(', '$aServices);
        
    printf('Selected services: %s'$sServices);

    Last edited by Fou-Lu; 08-21-2011 at 08:27 PM.

  • #8
    New Coder
    Join Date
    Aug 2011
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Okay no iam still getting all of them in email here the code for html and php ..

    HTML
    <tr>
    <td width="170" height="177" valign="bottom" align="center">
    <input type="checkbox" name="services[]" value="Random%20Design" /><img src="images/form-MediaCommercial .jpg" width="170" height="177" alt="Media Commercial"></td>
    <td width="10"></td>
    <td width="170" height="177" valign="bottom" align="center">
    <input type="checkbox" name="services[]" value="Web%20Design" /><img src="images/form-web-design.jpg" width="170" height="177" alt="Web Design"></td>
    <td width="10"></td>
    <td width="170" height="177" valign="bottom" align="center">
    <input type="checkbox" name="services[]" value="Photography" /><img src="images/form-photography.jpg" width="170" height="177" alt="Photography"></td>
    <td width="10"></td>
    <td width="170" height="177" valign="bottom" align="center">
    <input type="checkbox" name="services[]" value="SEO" /><img src="images/form-SEO.jpg" width="170" height="177" alt="SEO"></td>
    </tr>


    PHP CODE

    <?php

    // EDIT THE 2 LINES BELOW AS REQUIRED
    $email_to = "mursallotest@msn.com";
    $email_subject = "Hello";


    function died($error) {
    // your error code can go here
    echo "We are very sorry, but there were error(s) found with the form you submitted. ";
    echo "These errors appear below.<br /><br />";
    echo $error."<br /><br />";
    echo "Please go back and fix these errors.<br /><br />";
    die();
    }


    $first_name = $_POST['FirstName']; // required
    $last_name = $_POST['LastName']; // required
    $city = $_POST['City']; // required
    $state = $_POST['State']; // required
    $postal_code = $_POST['Postalcode']; // required
    $email_address = $_POST['EmailAddress']; // required
    $work_phone = $_POST['WorkPhone']; // not required
    $mobile_phone = $_POST['MobilePhone']; // required





    if (isset($_POST['services']) && is_array($_POST['services']))
    {
    $aServices = array_map('clean_string', $_POST['services']);
    $sServices = implode(', ', $aServices);
    printf('Selected services: %s', $sServices);
    }


    $personal_commercial = $_POST['PersonalCommercial']; // required
    $completed_by = $_POST['CompletedBy']; // required
    $referral = $_POST['Referral']; // not required





    $comments = $_POST['Your_Message'];


    $error_message = "";
    $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
    if(!preg_match($email_exp,$email_address)) {
    $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
    }
    $string_exp = "/^[A-Za-z .'-]+$/";
    if(!preg_match($string_exp,$first_name)) {
    $error_message .= 'The First Name you entered does not appear to be valid.<br />';
    }
    if(!preg_match($string_exp,$last_name)) {
    $error_message .= 'The Last Name you entered does not appear to be valid.<br />';
    }
    if(strlen($comments) < 2) {
    $error_message .= 'The Comments you entered do not appear to be valid.<br />';
    }
    if(strlen($error_message) > 0) {
    died($error_message);
    }
    $email_message = "Form details below.\n\n";

    function clean_string($string) {
    $bad = array("content-type","bcc:","to:","cc:","href");
    return str_replace($bad,"",$string);
    }

    $email_message .= "First Name: ".clean_string($first_name)."\n";
    $email_message .= "Last Name: ".clean_string($last_name)."\n";
    $email_message .= "City: ".clean_string($city)."\n";
    $email_message .= "State: ".clean_string($state)."\n";

    $email_message .= "Postal Code: ".clean_string($postal_code)."\n";
    $email_message .= "Email Address: ".clean_string($email_address)."\n";
    $email_message .= "Work Phone: ".clean_string($work_phone)."\n";
    $email_message .= "Mobile Phone: ".clean_string($mobile_phone)."\n";


    $email_message .= "Business Cards: ".clean_string($business_cards)."\n";
    $email_message .= "Brochures: ".clean_string($brochures)."\n";
    $email_message .= "Flyer Design: ".clean_string($flyer_design)."\n";
    $email_message .= "logo Design: ".clean_string($logo_design)."\n";
    $email_message .= "Page Layout: ".clean_string($page_layout)."\n";
    $email_message .= "Poster Design: ".clean_string($poster_design)."\n";
    $email_message .= "Videography: ".clean_string($videography)."\n";
    $email_message .= "TShirt Design: ".clean_string($tshirt_design)."\n";
    $email_message .= "Random Design: ".clean_string($random_design)."\n";
    $email_message .= "Web Design: ".clean_string($web_design)."\n";
    $email_message .= "Photography: ".clean_string($photography)."\n";
    $email_message .= "SEO: ".clean_string($seo)."\n";


    $email_message .= "Personal Commercial: ".clean_string($personal_commercial)."\n";
    $email_message .= "Completed By: ".clean_string($completed_by)."\n";
    $email_message .= "Referral: ".clean_string($referral)."\n";
    $email_message .= "Comments: ".clean_string($comments)."\n";


    // create email headers
    $headers = 'From: '.$email_from."\r\n".
    'Reply-To: '.$email_from."\r\n" .
    'X-Mailer: PHP/' . phpversion();
    @mail($email_to, $email_subject, $email_message, $headers);
    ?>

    <!-- include your own success html here -->

    Thank you for contacting us. We will be in touch with you very soon.



    <?php

    ?>

    SUPPOSE TO BE LIKE THIS OR NO.....

  • #9
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    You are still getting them in the email since you have not removed them. You want to move that code in place of where it should appear and assign the implode to the $email_message concatination instead of printing it.

  • #10
    New Coder
    Join Date
    Aug 2011
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Okay I change the code from implode to $email_message below is the example.....now i get this message after submiting the form ( Fatal error: Function name must be a string in /home4/tayebdes/public_html/mxstudio/send_form_email.php on line 34 )


    if (isset($_POST['services']) && is_array($_POST['services']))
    {
    $aServices = array_map('clean_string', $_POST['services']);
    $sServices = $email_message(', ', $aServices);
    printf('Selected services: %s', $sServices);
    }

  • #11
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    No no no, $sServices still remains as is. What this is trying to do is call a function declared in $email_message, but it doesn't exist:
    PHP Code:
    if (isset($_POST['services']) && is_array($_POST['services']))
    {
        
    $aServices array_map('clean_string'$_POST['services']);
        
    $sServices implode(', '$aServices);
        
    $email_message .= 'Selected Services: ' $sServices;

    Don't forget to use [php][/php] tags around your PHP code.

  • #12
    New Coder
    Join Date
    Aug 2011
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts
    still the same iam getting all of them....

    Form details below.

    First Name: mursallo
    Last Name: john
    City: toronto
    State: Nova Scotia
    Postal Code: m2c4g7
    Email Address: mursallo@msn.com
    Work Phone: 4167859623
    Mobile Phone: 4165287412
    Business Cards:
    Brochures:
    Flyer Design:
    logo Design:
    Page Layout:
    Poster Design:
    Videography:
    TShirt Design:
    Random Design:
    Web Design:
    Photography:
    SEO:

    Personal Commercial: commercial
    Completed By: 1 month
    Referral: google
    Comments: just testing thank you...


    IS MY PHP CODE RITE CUZ SOMETHING LOOK FISHY TO ME WHAT YOU THINK???

  • #13
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Did you remove those from the email section? And move the new block into their place? Post the current code you are using.

  • #14
    New Coder
    Join Date
    Aug 2011
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Okay I remove the email section and what you mean by new block?? this is what i get in email no checkbox after removing the email section..

    Form details below.

    First Name: mursallo
    Last Name: john
    City: toronto
    State: Quebec
    Postal Code: m2c4g7
    Email Address: mursallo@msn.com
    Work Phone: 4167859623
    Mobile Phone: 4165287412
    Personal Commercial: commercial
    Completed By: 1month
    Referral: google
    Comments: just testing

  • #15
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Quote Originally Posted by mursallo View Post
    Okay I remove the email section and what you mean by new block?? this is what i get in email no checkbox after removing the email section..

    Form details below.

    First Name: mursallo
    Last Name: john
    City: toronto
    State: Quebec
    Postal Code: m2c4g7
    Email Address: mursallo@msn.com
    Work Phone: 4167859623
    Mobile Phone: 4165287412
    Personal Commercial: commercial
    Completed By: 1month
    Referral: google
    Comments: just testing
    Quote Originally Posted by Fou-Lu View Post
    ...Post the current code you are using.
    As above.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •