O'Reilly logo

Effortless E-Commerce with PHP and MySQL by Larry Ullman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Emailing Receipts

The final.php script includes email_receipt.php, whose role it is to email a receipt to the customer. Because a lot of information could be in this receipt (itemizing multiple products), sending an HTML receipt is a logical choice. Considering that some people like HTML email and others don’t, the professional solution is to send an email that’s viewable in either HTML (Figure 10.18) or plain text format (Figure 10.19). That’s what email_receipt.php will do.

Figure 10.18

image

Figure 10.19

image

Tip

You can also use the PEAR Mail_Mime ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required