tailieunhanh - Tự học HTML và CSS trong 1 giờ - part 68

Tham khảo tài liệu 'tự học html và css trong 1 giờ - part 68', công nghệ thông tin, đồ họa - thiết kế - flash phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 646 LESSON 21 Taking Advantage of the Server title Registration Form title style type text css color red style head body h1 Registration Form h1 p Please fill out the form below to register for our site. Fields with bold labels are required. p php if empty errors ul php foreach array_values errors as error li error li php ul php form method post action _SERVER PHP_SELF p php if array_key_exists name errors label for name class error b Name b label php else label for name b Name b label php br input name name value strip_tags _POST name p p php if array_key_exists age errors label for age class error b Age b label php else label for age b Age b label php br input name age value strip_tags _POST age p p php if array_key_exists toys errors label class error b Toys b label php else label b Toys b label php br php foreach toys as key value label input type checkbox name toys php if array_key_exists toys _POST in_array key Download from Using PHP Includes 647 S_POST toys echo value Skey php p checked checked Svalue label br p input type submit form body html value register p Output FIGURE A form with some errors that were caught during validation. Using PHP Includes PHP and all other server-side scripting languages provide the ability to include snippets of code or markup in pages. With PHP the ability to include files is built into the language. Because the include statements are part of the language you don t need to include parentheses around the name of the file to be included. You can conditionally include files specify which file to include dynamically or even nest include function calls within included pages. Here s a simple example of an include call include On encountering that function call PHP will try to read in and process a file named in the same directory as the current page. If it can t find this file it will try to find the file in each of the directories in its include path too. The include path is

crossorigin="anonymous">
Đã 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.