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

Bởi bây giờ, hầu hết các mã trong phần này nên được dễ dàng cho bạn hiểu. Các bước tham gia vào việc tạo ra một bài, chỉnh sửa một bài viết, trả lời bài, và hiển thị một diễn đàn hoặc bài đã được bao phủ trong các ứng dụng tương tự trong các chương trước. | Chapter 16 ----Simpo PDF Merge and Split Unregistered Version - http Figure 16-7 How It Works By now most of the code in this section should be easy for you to understand. The steps involved in creating a post editing a post replying to a post and displaying a forum or post have been covered in similar applications in the previous chapters. The basics of that process being collect information from the user store it in a database and display the information based on user request. Since we ve covered this kind of behavior before let s talk about something a little more powerful searching. Searching A bulletin board would not be worth much in the long run unless you had the ability to search for old posts. Visit any bulletin board you might be familiar with and most likely you will find a search function there. There are many types of searches. The simplest requires that you enter text into an input field and when you click the Search button it looks for any of the text you entered. That is the search we created for this application. 636 Creating a Bulletin Board System Simpo PDF Merge and Split Unregistered Version - http Searches can get very complicated too. You might want to search posts by the date they were entered or by author. You might want to find a range of dates. You might even want to be able to designate how the result page is sorted. These capabilities are not currently available in the CBA Forums but if you feel ambitious enough feel free to beef up your search. The actual search mechanism is fairly simple and we quickly introduced it in Chapter 13. You have a single text field with a Search button that submits your form. The page captures the search term and builds a relatively simple SQL statement that is designed to return matching rows. You then simply iterate through those rows and display the data on the screen. It s not that much different than displaying a forum or thread on

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.