This project is with E-Commerce. There is option to Add to Cart. When user click on add, product will be added to his cart as well and working fine.
use jquery
and capture the html table
that you want to send as email. and pass the variable to the email function using ajax
, try this,
jquery veriable = htmlstring
also you can use jquery
serialize
method to get all form inputs.
https://api.jquery.com/serialize/
CI ocontroller
public function testmail(){
$to = 'mail@gmail.com';
$subject = 'Enquiry from ';
$message = $_POST['table'];
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
if(mail($to, $subject, $message, $headers))
{
}
}