0

In my site: http://domain.com/submitcart.html I have added add to cart code from minicartjs.com. But when I click view cart it is showing all the products added by user, but when i click submit it redirects to http://domain.com/cart.php and shows your cart is received. But when i check mail it won't shows the user cart items and details.

I think in php code i did so many mistakes. I didn't understand how i should call the entire added cart in php.

My php code is:

          <?php
          $Item_name = $_POST['item_name'];
          $amount = $_POST['amount'];
          $currency_code = $_POST['currency_code'];

          $formcontent= 
                    "Name: $Item_name\n
                     Amount: $amount\n
                     Cart: $currency_code";
          $recipient = "info@domain.com";
          $subject = "Added Products in cart";
          $headers = 'From: '.$Name."\r\n".
                     'Cc: '.$Email."\r\n";

           mail($recipient, $subject, $formcontent, $headers) or die("Error!");
          echo "Your Added Cart has been received";
         ?> 

I think this code is entirely wrong. Please help me what i should insert php code...Every suggestion is helpful to me.

Tejaswini
  • 45
  • 1
  • 8

0 Answers0