PHP and MySQL Web Development - P10

PHP and MySQL Web Development - P10: PHP and MySQL Web Development teaches the reader to develop dynamic, secure, commercial Web sites. Using the same accessible, popular teaching style of the first edition, this best-selling book has been updated to reflect the rapidly changing landscape of MySQL and PHP. | 12 Chapter 1 PHP Crash Course Assigning values to variables Constants Variable scope Operators and precedence Expressions Variable functions Making decisions with if else and switch Iteration while do and for loops Using PHP In order to work through the examples in this chapter and the rest of the book you will need access to a Web server with PHP installed. To get the most from the examples and case studies you should run them and try changing do this you ll need a testbed where you can experiment. If PHP is not installed on your machine you will need to begin by installing it or getting your system administrator to install it for can find instructions for doing so in Appendix A Installing PHP 4 and MySQL. Everything you need to install PHP under UNIX or Windows NT can be found on the accompanying CD-ROM. Sample Application Bob s Auto Parts One of the most common applications of any server side scripting language is processing HTML ll start learning PHP by implementing an order form for Bob s Auto Parts a fictional spare parts company. All the code for the Bob s examples used in this chapter is in the directory called chapter1 on the CD-ROM. The Order Form Right now Bob s HTML programmer has gotten as far as setting up an order form for the parts that Bob order form is shown in Figure is a relatively simple order form similar to many you have probably seen while surfing. The first thing Bob would like to be able to do is know what his customer ordered work out the total of the customer s order and how much sales tax is payable on the order. Part of the HTML for this is shown in Listing are two important things to notice in this code. Sample Application Bob s Auto Parts 13 Figure Bob s initial order form only records products and quantities. Listing HTML for Bob s Basic Order Form form action method post table border 0 tr bgcolor cccccc td width 150 Item td td width 15 .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
2    107    3    25-04-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.