TAILIEUCHUNG - PHP and MySQL Web Development - P121

PHP and MySQL Web Development - P121: 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. | 572 Chapter 26 Building a Content Management System w get_writer_record HTTP_SESSION_VARS auth_user print Welcome . w full_name print a href Logout a The function get_writer_record is defined in and returns an array of all the fields in the writer table for the passed in username. The script simply unsets the value of auth_user. The following SQL finds all a writer s stories starting with the most recently added sql select from stories where writer . HTTP_SESSION_VARS auth_user . .order by created desc We are storing a created modified and published timestamp against each story record. When a new story is added both the created and modified timestamps are set to the system time. Each subsequent change updates only the modified field. All this information is shown on the stories screen first with print date M d H i qry created and then print date M d H i qry modified and finally if qry published print Published .date M d H i qry published . else print a href story . qry id . edit a print a href story . qry id . delete a print a href story . qry id . keywords a This will show the published date if appropriate otherwise it will show links to edit or delete that story and to set search keywords. The script for entering a new story or editing an existing one is and is shown in Figure editing one of the stories in the sample application database. The complete listing of can be seen in listing . Implementation 573 Figure Editing a story. Listing Is Used to Create or Edit a Story php include if isset HTTP_GET_VARS story s get_story_record HTTP_GET_VARS story form action method post enctype multipart form-data input type hidden name story value php print HTTP_GET_VARS story input type hidden name destination value php print HTTP_SERVER_VARS HTTP_REFERER table tr td align center Headline td tr tr 574 Chapter 26 Building a

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.