TAILIEUCHUNG - PHP and MySQL Web Development - P116

PHP and MySQL Web Development - P116: 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. | Implementing an Administration Interface 547 This code probably looks familiar it is similar to a script from Chapter 24. After the administrator reaches this point she can change her password or log out this code is identical to the code in Chapter 24 so we will not cover it here. We identify the administration user after login by means of the admin_user session variable and the check_admin_user function and the others used by the administrative scripts can be found in the function library . If the administrator chooses to add a new category or book she will go to either or as appropriate. Each of these scripts presents the administrator with a form to fill in. Each is processed by a corresponding script and which verifies that the form is filled out and inserts the new data into the database. We will look at the book versions of the scripts only as they are very similar to one another. The output of is shown in Figure . You will notice that the Category field for books is an HTML SELECT element. The options for this SELECT come from a call to the get_categories function we have looked at previously. When the Add Book button is clicked the script will be activated. The code for this script is shown in Listing . Figure This form allows the administrator to enter new books into the online catalog. 548 Chapter 25 Building a Shopping Cart Listing This Script Validates the New Book Data and Puts It into the Database php include function files for this application require_once session_start do_html_header Adding a book if check_admin_user if filled_out HTTP_POST_VARS isbn HTTP_POST_VARS isbn title HTTP_POST_VARS title author HTTP_POST_VARS author catid HTTP_POST_VARS catid price HTTP_POST_VARS price description HTTP_POST_VARS description if insert_book isbn title author .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.