Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to send results to email using dynamic form
    primarykey
    data
    text
    <pre><code>$ids = explode(',', $_POST['count']); for($i = 0; $i &lt; count($ids); $i++) { $level = $_POST['level' . $ids[$i]]; $institution = $_POST['institution' . $ids[$i]]; $board = $_POST['board' . $ids[$i]]; $division = $_POST['division' . $ids[$i]]; echo "level: " . $level; echo " institution: " . $institution; echo " board: " . $board; echo " division: " . $division; echo "&lt;br /&gt;"; } </code></pre> <p>How can I assemble all of the above into a single string: <code>$message = "code here";</code>? I have tried <code>$message = "$ids";</code> but it's shows me "Array". It should send all results to email but it sends only first line of results if I use <code>$message = "level: $level institution: $institution board: $board division: $division";</code></p> <p>Example of desired results:</p> <pre><code>// only sends the first line level: test1 institution: test2 board: test3 division; test4 level: test10 institution: test20 board: test30 division; test40 </code></pre> <p>I dynamically add, remove and validate form fields in jQuery from the link below <a href="http://www.pradipchitrakar.com.np/blog/dynamically-add-remove-textfield.html" rel="nofollow">http://www.pradipchitrakar.com.np/blog/dynamically-add-remove-textfield.html</a></p> <pre><code>&lt;?php // Contact subject $subject ="new order "; // Details $message="**cant work out code here for all results to display**"; // Mail of sender $mail_from="$email"; // From $header="from: $name &lt;$email&gt;"; // Enter your email address $to ='test@mail.com'; $send_contact=mail($to,$subject,$message,$header); // Check, if message sent to your email // display message "We've recived your information" if($send_contact){ echo "We've recived your contact information"; } else { echo "ERROR"; } ?&gt; </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.
 

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