tailieunhanh - Bài giảng PHP (Hypertext Preprocessing) - Chương 3: Làm việc với Form

Bài giảng PHP (Hypertext Preprocessing) - Chương 3: Làm việc với Form trình bày các nội dung chính sau: Các biến Super Global, biến $_SERVER, lấy thông tin từ form, kết hợp mã HTML và PHP trong 1 trang, sử dụng Hidden field để lưu trạng thái, form Upload file,. để nắm nội dung chi tiết. | Bài giảng PHP (Hypertext Preprocessing) - Chương 3: Làm việc với Form III. Làm việc với Form . Các biến SuperGlobal . Biến $_SERVER . Lấy thông tin từ form . Kết hợp mã HTML và PHP trong 1 trang . Sử dụng Hidden field để lưu trạng thái . Redirect . Form Upload file . Các biến SuperGlobal Các biến global là các biến được khai báo ở mức ngoài cùng của PHP được sử dụng chung cho mọi module Các biến SuperGlobal là các biến (mảng) được PHP tạo ra để lưu các thông tin cần thiết Array Description $_COOKIE Contains keys and values set as browser cookies $_ENV Contains keys and values set by the script's shell context $_FILES Contains information about uploaded files $_GET Contains keys and values submitted to the script using the HTTP get method $_POST Contains keys and values submitted to the script using the HTTP post method $_REQUEST A combined array containing values from the $_GET, $_POST, and $_COOKIES superglobal arrays $_SERVER Variables made available by the server . Biến $_SERVER Variable Contains Example $_SERVER['PHP_SELF'] The current script. /phpbook/source/ Suitable for use in p links and form element action arguments. $_SERVER['HTTP_USER_AGEN The name and Mozilla/ –(X11; I;. 6- T'] version of the client. 15apmac ppc) $_SERVER['REMOTE_ADDR'] The IP address of the client. $_SERVER['REQUEST_METHO Whether the request POST D'] was GET or POST. $_SERVER['QUERY_STRING'] For GET requests, name=matt&address=unknown the encoded data sent appended to the URL. $_SERVER['REQUEST_URL'] The full address of /phpbook/source/ the request, p? name=matt including query string. $_SERVER['HTTP_REFERER'] The address of the page from which the request was made. . Biến $_SERVER (2) Đoạn lệnh sau liệt kê tất cả các thông tin của biến $_SERVER . Lấy thông tin từ form . Lấy .

TỪ KHÓA LIÊN QUAN
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.