Presentation is loading. Please wait.

Presentation is loading. Please wait.

Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 1.

Similar presentations


Presentation on theme: "Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 1."— Presentation transcript:

1 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 1

2 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 2

3 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 3

4 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 4

5 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 5

6 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 6

7 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 7

8 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 8

9 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 9

10 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 10

11 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 11

12 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 12 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...> Product Discount Calculator Product Discount Calculator Product Description: List Price: Discount Percent: %

13 © 2010, Mike Murach & Associates, Inc.Slide 13 body { font-family: Arial, Helvetica, sans-serif; } #content { width: 450px; margin: 0 auto; padding: 0px 20px 20px; background: white; border: 2px solid navy; } h1 { color: navy; } label { width: 10em; padding-right: 1em; float: left; } #data input { float: left; width: 15em; margin-bottom:.5em; } #buttons input { float: left; margin-bottom:.5em; } br { clear: left; }

14 © 2010, Mike Murach & Associates, Inc.Slide 14 <?php // get the data from the form $product_description = $_POST['product_description']; $list_price = $_POST['list_price']; $discount_percent = $_POST['discount_percent']; // calculate the discount $discount = $list_price * $discount_percent *.01; $discount_price = $list_price - $discount; // apply formatting to the dollar and percent amounts $list_price_formatted = "$".number_format($list_price, 2); $discount_percent_formatted = $discount_percent."%"; $discount_formatted = "$".number_format($discount, 2); $discount_price_formatted = "$".number_format($discount_price, 2); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional...> Product Discount Calculator Product Discount Calculator Product Description: List Price: Standard Discount: Discount Amount: Discount Price:

15 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 15

16 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 16

17 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 17

18 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 18

19 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 19

20 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 20

21 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 21

22 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 22

23 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 23

24 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 24

25 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 25

26 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 26

27 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 27

28 Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 28


Download ppt "Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 1."

Similar presentations


Ads by Google