TAILIEUCHUNG - PHP and MySQL Web Development - P138

PHP and MySQL Web Development - P138: 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 Administrative Functions 657 Listing store_list Function from This Function Inserts a New Mailing List into the Database function store_list admin_user details if filled_out details echo All fields must be filled in. Try again. br br return false else if check_admin_user admin_user return false how did this function get called by somebody not logged in as admin if db_connect return false query select count from lists where listname . details name . result mysql_query query if mysql_result result 0 0 0 echo Sorry there is already a list with this name. return false query insert into lists values NULL . details name . . details blurb . result mysql_query query return result This function performs a few validation checks before writing to the database It checks that all the details were supplied that the current user is an administrator and that the list name is unique. If all goes well the list is added to the lists table in the database. Uploading a New Newsletter Finally we come to the main thrust of this application uploading and sending newsletters to mailing lists. 658 Chapter 28 Building a Mailing List Manager When an administrator clicks on the Create Mail button it activates the create-mail action as follows case create-mail display_mail_form get_email break The administrator will see the form shown in Figure . Figure The Create Mail option gives the administrator an interface for uploading newsletter files. Remember that for this application we are assuming that the administrator has created a newsletter offline in both HTML and text formats and will upload both versions before sending. We chose to implement it this way so that administrators can use their favorite software to create the newsletters. This makes the application more accessible. You can see that this form has a number of fields for an administrator to fill out. At the top is a drop-down box of mailing lists to choose from. The administrator must also .

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.