Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Cơ sở dữ liệu
PHP and MySQL Web Development - P12
Đang chuẩn bị liên kết để tải về tài liệu:
PHP and MySQL Web Development - P12
Bích Hằng
130
5
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
PHP and MySQL Web Development - P12: PHP and MySQL Web Development teaches the reader to develop dynamic, secure, commercial Web sites. Using the same accessible, popular teaching style of the first edition, this best-selling book has been updated to reflect the rapidly changing landscape of MySQL and PHP. | 22 Chapter 1 PHP Crash Course Let s look at an example. Because the long style variable names are somewhat cumbersome and rely on a variable type known as arrays which we will not cover properly until Chapter 3 Using Arrays we will start by creating easier-to-use copies. To copy the value of one variable into another you use the assignment operator which in PHP is an equal sign .The following line of code will create a new variable named tireqty and copy the contents of HTTP_POST_VARS tireqty into the new variable tireqty HTTP_POST_VARS tireqty Place the following block of code at the start of the processing script. All other scripts in this book that handle data from a form will contain a similar block at the start. As it will not produce any output it makes no difference whether you place this above or below the html and other HTML tags that start your page.We are generally placing this block at the very start of the script to make it easy to find. php create short variable names tireqty HTTP_POST_VARS tireqty oilqty HTTP_POST_VARS oilqty sparkqty HTTP_POST_VARS sparkqty This code is creating three new variables tireqty oilqty and sparkqty and setting them to contain the data that was sent via the POST method from the form. To make the script start doing something visible add the following lines to the bottom of your PHP script echo p Your order is as follows p echo tireqty. tires br echo oilqty. bottles of oil br echo sparkqty. spark plugs br If you now load this file in your browser the script output should resemble what is shown in Figure 1.4.The actual values shown will of course depend on what you typed into the form. A couple of interesting things to note in this example are discussed in the following subsections. String Concatenation In the script we used echo to print the value the user typed in each of the form fields followed by some explanatory text. If you look closely at the echo statements you will see that the variable name and following text have
TÀI LIỆU LIÊN QUAN
PHP and MySQL Web Development
Beginning PHP 6, Apache, MySQL 6 Web Development
www.it-ebooks.info .PHP & MySQL FOR ® Web Development ALL-IN-ONE DESK REFERENCE DUMmIES ‰ by Janet Valade with Tricia Ballad and Bill Ballad www.it-ebooks.info .www.it-ebooks.info .PHP & MySQL FOR ® Web Development ALL-IN-ONE DESK REFERENCE DU
ICT 5 Web Development - Chapter 6.1: Using MySQL with PHP
PHP & MySQL Web Development All-in-One Desk Reference For Dummies
Beginning PHP6, Apache, MySQL Web Development
Web Application Development with Yii and PHP
ICT 5 Web Development - Chapter 6.2: MySQL & PHP Advanced
BEGINNING PHP5.APACHE.MYSQL WEB DEVELOPMENT
PHP 5 e-commerce Development- P33PHP 5 e-commerce Development- P33
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.