Beginning PHP5, Apache, and MySQL Web Development split phần 7

Cho đến nay, bạn đã tạo ra một hệ thống để tạo ra và quản lý người sử dụng, và xuất bản các bài báo, nhưng có một vài tính năng bổ sung có thể giúp làm cho CMS của bạn nhiều hơn có thể sử dụng và quản lý. Những gì bạn sẽ thêm vào là khả năng cho người dùng để cập nhật thông tin của họ, và khả năng tìm kiếm bài báo xuất bản bằng từ khóa. | Chapter 13 -----Simpo PDF Merge and Split Unregistered Version - http Display all the current comments for this article on this page form php showComments _GET article FALSE require_once And that s it They re getting easier aren t they Stay with us only a couple more short ones. That last one was a doozy huh Additional CMS Features So far you ve created a system to create and manage users and publish articles but there are a couple additional features that can help make your CMS a lot more usable and manageable. What you re going to add is the ability for users to update their information and the ability to search published articles by keyword. Try It Out User Control Panel In this exercise you re going to create a page so users can maintain their own information. 1. Enter the following code and save it as php require_once require_once sql SELECT name email . FROM cms_users . WHERE user_id . _SESSION user_id result mysql_query sql conn or die Could not look up user data . mysql_error user mysql_fetch_array result form method post action p Name br input type text id name name name value php echo htmlspecialchars user name - p p Email br input type text id email name email value php echo htmlspecialchars user email p p input type submit class submit name action value Change my info p 472 Building a Content Management System Simpo PDF Merge and Split Unregistered Version - http form h2 Pending Articles h2 div class scroller table php sql SELECT article_id title date_submitted . FROM cms_articles . WHERE is_published 0 . AND author_id . _SESSION user_id . . ORDER BY date_submitted result mysql_query sql conn or die Could not get list of pending articles . mysql_error if mysql_num_rows result 0 echo em No pending articles available em else while row mysql_fetch_array result echo tr n echo td a href article . row article_id . . .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã 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.