TAILIEUCHUNG - PHP and MySQL Web Development - P137

PHP and MySQL Web Development - P137: 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. | 652 Chapter 28 Building a Mailing List Manager The subscribe function adds a row to the sub_lists table corresponding to the subscription the unsubscribe function deletes this row. Changing Account Settings The Account Settings button when clicked activates the account-settings action. The code for this action is as follows case account-settings display_account_form get_email get_real_name get_email get_mimetype get_email break As you can see we are reusing the display_account_form function that we used to create the account in the first place. However this time we are passing in the user s current details which will be displayed in the form for easy editing. When the user clicks on the submit button in this form the store-account action is activated as discussed previously. Changing Passwords Clicking on the Change Password button activates the change-password action which triggers the following code case change-password display_password_form break The display_password_form function from the library simply displays a form for the user to change his form is shown in Figure . When a user clicks on the Change Password button at the bottom of this form the store-change-password action will be code for this is as follows case store-change-password if change_password get_email HTTP_POST_VARS old_passwd HTTP_POST_VARS new_passwd HTTP_POST_VARS new_passwd2 echo p OK Password changed. p br br br br br br else echo p Sorry your password could not be changed. p display_password_form Implementing User Functions 653 break Figure The display_password_form function enables users to change their passwords. As you can see this code tries to change the password using the change_password function and reports success or failure to the change_password function can be found in the function library. The code for this function is shown in Listing . Listing change_password Function from .

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.