PHP & MySQL for Dummies- P9
Số trang: 50
Loại file: pdf
Dung lượng: 0.00 B
Lượt xem: 7
Lượt tải: 0
Xem trước 5 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Tham khảo tài liệu php & mysql for dummies- p9, công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
Nội dung trích xuất từ tài liệu:
PHP & MySQL for Dummies- P9 Chapter 12: Building a Members Only Web Site 381 If you already have an account, log in. If you do not have an account, register now. ➝75 382 Part IV: Applications Listing 12-3: (continued) else $type = “text”; echo “ $value ”; } //end else } // end foreach field ?> ➝137 The following numbers refer to the line numbers in Listing 12-3: ➝7 Creates the array that contains the fields in the login form. ➝9 Creates the array that contains the fields in the registration form. ➝21 Includes a file that contains the functions used in this program. The file contains the functions getStateName() and getState Code() that are used later in the program. ➝22 Ends the opening PHP section. ➝46 Opens the that contains the login form. ➝50 Opens a new PHP section. ➝51 Begins an if statement that checks whether an error message exists for the login form. If the message exists, the message is displayed. ➝55 Starts a foreach statement that loops through the array of fields for the login form and echoes the fields for the form. ➝75 Closes the that contains the login form. ➝77 Opens the that contains the registration form. ➝82 Begins an if statement that checks whether an error message exists for the registration form. If the message exists, the message is displayed. ➝86 Starts a foreach statement that loops through the array of fields for the login form and echoes the fields for the form.Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Chapter 12: Building a Members Only Web Site 383 ➝88 Begins an if statement that checks whether the field is state. If it is, a drop-down list is created for the customer to select a state. Note that lines 93 and 94 call functions. These functions — my functions, not PHP functions — are included in the program on line 21. The functions create arrays from a list of state names and a list of two-letter state codes. The functions eliminate the need to include the two 50-state lists in the program. The functions can be used repeatedly for many programs. The function12.inc file contains the two functions, as follows: 384 Part IV: Applications Writing New_member The New Member Welcome page greets new members by name and provides information about their accounts. Members then have the choice of entering the Members Only section or returning to the main page. Listing 12-4 shows the program that displays the page that new members see. Listing 12-4: Welcoming New Members ➝28 Your new Member Account lets you enter the Members Only section of our web site. You’ll find special discounts and bargains, a huge database of animal facts and stories, advice from experts, advance notification of new pets for sale, a message board where you can talk to other Members, and much more. Your new Member ID and password were emailed to you. Store them c ...
Nội dung trích xuất từ tài liệu:
PHP & MySQL for Dummies- P9 Chapter 12: Building a Members Only Web Site 381 If you already have an account, log in. If you do not have an account, register now. ➝75 382 Part IV: Applications Listing 12-3: (continued) else $type = “text”; echo “ $value ”; } //end else } // end foreach field ?> ➝137 The following numbers refer to the line numbers in Listing 12-3: ➝7 Creates the array that contains the fields in the login form. ➝9 Creates the array that contains the fields in the registration form. ➝21 Includes a file that contains the functions used in this program. The file contains the functions getStateName() and getState Code() that are used later in the program. ➝22 Ends the opening PHP section. ➝46 Opens the that contains the login form. ➝50 Opens a new PHP section. ➝51 Begins an if statement that checks whether an error message exists for the login form. If the message exists, the message is displayed. ➝55 Starts a foreach statement that loops through the array of fields for the login form and echoes the fields for the form. ➝75 Closes the that contains the login form. ➝77 Opens the that contains the registration form. ➝82 Begins an if statement that checks whether an error message exists for the registration form. If the message exists, the message is displayed. ➝86 Starts a foreach statement that loops through the array of fields for the login form and echoes the fields for the form.Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Chapter 12: Building a Members Only Web Site 383 ➝88 Begins an if statement that checks whether the field is state. If it is, a drop-down list is created for the customer to select a state. Note that lines 93 and 94 call functions. These functions — my functions, not PHP functions — are included in the program on line 21. The functions create arrays from a list of state names and a list of two-letter state codes. The functions eliminate the need to include the two 50-state lists in the program. The functions can be used repeatedly for many programs. The function12.inc file contains the two functions, as follows: 384 Part IV: Applications Writing New_member The New Member Welcome page greets new members by name and provides information about their accounts. Members then have the choice of entering the Members Only section or returning to the main page. Listing 12-4 shows the program that displays the page that new members see. Listing 12-4: Welcoming New Members ➝28 Your new Member Account lets you enter the Members Only section of our web site. You’ll find special discounts and bargains, a huge database of animal facts and stories, advice from experts, advance notification of new pets for sale, a message board where you can talk to other Members, and much more. Your new Member ID and password were emailed to you. Store them c ...
Tìm kiếm theo từ khóa liên quan:
thủ thuật máy tính công nghệ thông tin tin học quản trị mạng computer networkTài liệu liên quan:
-
52 trang 434 1 0
-
24 trang 359 1 0
-
Top 10 mẹo 'đơn giản nhưng hữu ích' trong nhiếp ảnh
11 trang 320 0 0 -
Làm việc với Read Only Domain Controllers
20 trang 310 0 0 -
74 trang 303 0 0
-
96 trang 299 0 0
-
Báo cáo thực tập thực tế: Nghiên cứu và xây dựng website bằng Wordpress
24 trang 291 0 0 -
Đồ án tốt nghiệp: Xây dựng ứng dụng di động android quản lý khách hàng cắt tóc
81 trang 286 0 0 -
EBay - Internet và câu chuyện thần kỳ: Phần 1
143 trang 277 0 0 -
Tài liệu hướng dẫn sử dụng thư điện tử tài nguyên và môi trường
72 trang 270 0 0