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

bạn có thể sẽ thấy ID ghi lại các giá trị và nhãn văn bản của họ như là sự lựa chọn danh sách. Một ví dụ tốt là một số sản phẩm và tên của nó. Khi sử dụng các danh sách, hãy chắc chắn để thiết lập một phần giá trị của các mục OPTION. | Chapter 7 ----Simpo PDF Merge and Split Unregistered Version - http 2. Have a page on your site with funny photographs or cartoons and allow your users to write the caption for them. Place the text in a speech bubble that is appropriately sized based on the length of the caption they submit. 3. Create a page for kids where they can choose different heads bodies and tails from animals and put them together to make a new creation and a new image. Or create a virtual paper doll site where kids can place different outfits on a model then save the images they create. 226 Simpo PDF Merge and Split Unregistered Version - http 8 Validating User Input If you plan to accept user input on your site you have to be prepared for mistakes. This could be simple human error or a deliberate attempt to circumvent your Web forms. The most common human errors include basic typographical errors and format errors failing to give a year in a date for example. Deliberate errors could be a user who doesn t want to provide his e-mail address or it could be an attacker deliberately trying to corrupt your database with unexpected characters. No matter what the source your script needs to be able to handle incorrect input usually by identifying the bad data and returning the user to the form page with an appropriate error message. This chapter covers user input validation including Validating simple string values Validating integer values Validating formatted text input Users Are Users Are Users . . . Consider an example You work in a bank. You are developing a new system to allow the employees to manage a customer account updating process on the company intranet. You use your well-known MM-DD-YYYY format for the date. It all works quite well when testing but when put in production your users say it doesn t work. Why Because all your company systems use the ISO 8601 YYYY-MM-DD date format a standard used in many systems because the date can be sorted .

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.