How to send transaction data from a block on mail?

Hello, I use this script to send mail send.php:
/* Set e-mail to Whom and from Whom to receive messages */ 
 $to = ""; // Here you need to write an e-mail will be sent letters 
 $from = ""; // Here you need to write an e-mail from whom to receive messages, for example

/* Specify variables to which to write the information from the form */
 $first_name = $_POST['first_name'];
 $email = $_POST['email'];
 $phone = $_POST['phone'];
 $message = $_POST['message'];
 $subject = "order Form numbers from calculator";//Fixed subject line

/* Check correct spelling of email addresses */
if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $email))
show_error("<br /> E-mail address does not exist");

/* Variable that will be sent to your email with the values entered into fields */
$mail_to_myemail = "Hello! 
The message was sent from the site! 
Sender's name: $first_name 
E-mail: $email 
Phone number: $phone 
Message text:<br> $message 
To reply to this email, create a new email, copy email address and paste in the to field."; 

$headers = "From: $from \r\n";

/* Send the message using mail () function */
 mail($to, $subject, $mail_to_myemail, $headers . 'Content-type: text/html; charset=utf-8');
 echo "Message sent. Thank You." $first_name . "we'll contact You shortly.";
 echo "<br /><br /><a href=''>to return to the site.</a>";
<!--Redirect to home page after 3 seconds-->
<script language="JavaScript" type="text/javascript">
function changeurl(){eval(self.location="");}

the code of the form looks like this:
<form action="send.php" method="post">

 Your name <input type="text" name="first_name"><br>
 Email: <input type="text" name="email" required placeholder="required field"><br>
 Phone number: <input type="text" name="phone"><br>
 Message:<br><textarea rows="5" name="message" cols="30" >
 <input type="submit" name="submit" value="Submit">

On the website there is still a unit, which dynamically loaded data from a script depending on the user's choice (roughly speaking, calculator). Looks like this:
<div class="col-xs-12 col-md-6 right-block">
 <div class="rtitle">Total vegetables:</div>
 <div class="lines-block">
 <p><span>Potato</span><span class="type-cart"></span></p>
 <p><span>Pineapple</span><span><label class="count-cart"></label> </p>
 <p class="freeday-line"><span>Every 7th free vegetable</span><span class="freeday-text"></span></p>
 <p class="eat-line"><span>Power</span><span class="eat-text"></span></p>
 <p class="filler-line"><span>Filler</span><span class="filler-text"></span></p>
 <p class="transfer-line"><span>transfer</span><span></span></p>


In the blocks with the class "type-cart, count-cart", etc. fits the data depending on the choice of the person. As this unit with the results of the selection can be sent in the mail along with the form?
March 12th 20 at 08:42
0 answer

Find more questions by tags JavaScriptPHP