Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your code will correctly implode the array with comma separation. But you're using the POSTed values to name the array element's key. This is not going to help you build the e-mail.</p> <p>For example, if the user selects "Heal Grind" and "Tour Grind", then your code creates:</p> <pre><code>$fields{"Heal Grind, Tour Grind"} = "Wedge Grind: "; </code></pre> <p>So the POSTed values are stored in the key, which doesn't seem very logical to me. Why not make it:</p> <pre><code>$fields{"WedgeGrind"} = "Wedge Grind: " . $grind; </code></pre> <p>Then in the e-mail, when you reference this field, it'll create:</p> <pre><code>Wedge Grind: Heal Grind, Tour Grind </code></pre> <p>Your values POST correctly. Since you didn't supply the full code, I'm not sure how you're trying to build the e-mail, but storing the values in the array key is not usually how it's done. It seems more logical to use the second example and build the e-mail using that.</p> <p>Also you have a checkbox option for "No Grind," but the user could also select any of the other grind options plus "No Grind." So if you receive an order for "No Grind" and "V-Grind," that would confuse you (I just assume) and you would need to follow up with the customer to verify the order. Rather, you can make the grind checkboxes optional and remove the "No Grind" option, that way if no grind is POSTed, you know no grind is desired.</p> <p>Unless the customer may be ordering multiple items with a different grind for each, then the existing system makes sense, though it could be improved a bit if that's the case.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload