Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is a very basic example of what your review.php file could look like. It adds each of the fields as hidden input variables in a form.</p> <pre><code>&lt;p&gt;Does everything look correct?&lt;/p&gt; &lt;form method="post" action="order.php"&gt; &lt;ul&gt; &lt;?php if (is_array($_REQUEST)) { foreach ($_REQUEST as $key =&gt; $val) { echo "&lt;li&gt;&lt;strong&gt;" . $key . "&lt;/strong&gt;: " . $val . "&lt;/li&gt;"; // This code should support the checkboxes and multiple selects if (is_array($val)) { foreach ($val as $val2) { echo "&lt;input type='hidden' name='" . $key . "[]' value='" . $val2 . "' /&gt;"; } } else { echo "&lt;input type='hidden' name='" . $key . "' value='" . $val . "' /&gt;"; } } } ?&gt; &lt;/ul&gt; &lt;input type="submit" value="Submit Info" /&gt; &lt;/form&gt; </code></pre> <p>Now on your order.php, lets clean it up and simplify it a bit, just because.</p> <pre><code>&lt;?php //define some fields define("HEADERS", "MIME-Version: 1.0\r\nContent-type:text/html;charset=iso-8859-1\r\nFrom: noreply@mycompany.com\r\n"); define("BODY_1", "We have received the following Online Order from www.mycompany.com:"); define("BODY_2", "Please Review the following Online Order from www.mycompany.com:"); define("SUBJECT_1", "Online Order"); define("SUBJECT_2", "Thank you for your order"); define("MY_EMAIL", "packy@mycompany.com"); define("REPLY", "Thank you for your order. Customer service will call in the next 24 hours to review your order.") //sanitize your inputs. I like to remove every character that is not allowed $data = array( 'name' =&gt; preg_replace('/[^A-Za-z\\s]/', '', $_POST['FitterName']), 'email' =&gt; preg_replace('/[^A-Za-z0-9\\.@-_]/', '', $_POST['CustomerEmail']), 'fitter' =&gt; preg_replace('/[^A-Za-z0-9\\.@-_]/', '', $_POST['FitterEmail']), 'grind' =&gt; preg_replace('/[^A-Za-z\\s,]/', '', implode(',', $_POST['grind'])), //the rest of your fields ); //do your field checks here, exit out or return them to the form //send your emails $send = mail(MY_EMAIL, SUBJECT_1, BODY_1 . print_r($data, true), HEADERS); $send2 = mail($data['fitter'], SUBJECT_2, BODY_2 . print_r($data, true), HEADERS); $send3 = mail($data['email'], SUBJECT_2, REPLY, HEADERS); //more code and redirect </code></pre>
    singulars
    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.
    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