617
25
25
بناء مشاريع PHP و MySQL عملية
الجزء V
| Checkout Microsoft Internet Explorer
https://webserver/chapter25/checkout.php
Book-O-Rama
Checkout
Sams Teach Yourself PHP4 in 24 Hours by Matt Zandstre
PHP and MySQL Web Development by Luke Welling and Laura Thomson
Name
Address
City/Suburb
State/Province
Postal Code or Zip Code
Country
Shipping Addrast fleave bank if is a59
Name
Address
$24.98 $49.99
$24.99
1
$49.99
الشكل (825)
يحصل النص البرمجي checkout.php على تفاصيل الزبون.
السرد (25-13) checkout.php - يحصل هذا النص البرمجي على تفاصيل الزبون
<?
//include our function set
include (book_sc_fns-php');
// The shopping cart needs sessions, so start one
session_start();
do_html_header("Checkout");
ount_values($cart))
if($cart&&array_c
f
display_cart($cart, false, 0);
display_checkout_form($HTTP_POST_VARS);
}
else
echo "<p>There are no items in your cart":
display_button( "show_cart.php". "continue
do_html_footer
?>
();
- shopping", "Continue Shopping");
لا مفاجآت كبيرة في هذا النص البرمجي. إذا كانت عربة التسوق فارغة، سيُبلغ النص البرمجي
الزبون بذلك؛ وإلا سيعرض النموذج المبين في الشكل (825).
ص٦٠١