TAILIEUCHUNG - Programming HandBook part 77

Tham khảo tài liệu 'programming handbook part 77', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | print Bạn đang sử dụng browser hoặc PHP Code print font color red Bạn đang sử dụng browser font Tạo 1 cái Shoutbox đơn giản Bạn làm theo các bước sau đây. B1 Tạo 1 DB như sau PHP Code CREATE TABLE tagboard id int 7 NOT NULL auto_increment name varchar 250 NOT NULL default comments text NOT NULL date timestamp 14 NOT NULL PRIMARY KEY id TYPE MyISAM aUtO_INCREMENT 419 B2 Viết 1 file có nội dung như sau PHP Code dbuser Database Username dbname Database Name dbpass Database Password B3 Tạo 1 file có nôi dung như sau PHP Code iframe src name tag width 179 height 130 frameborder 0 marginwidth 0 marginheight 0 iframe form method POST A CTION input type text NAME name Value textarea NAME post cols 27 rows 3 textarea br input TYPE submit value Submit B4 Tiếp theo là file PHP Code php if name post . die Please fill all fields. Click a HREF here a to return. include post preg_replace lt post post preg_replace gt post post nl2br post comments post c mysql_connect localhost dbuser dbpass mysql_select_db dbname todo INSERT INTO tagboard id name comments date VALUES nam e comments now solution mysql_query todo or die mysql_error if solution meta http-equiv refresh content 0 url B5 Cuối cùng là file PHP Code php include Kết nối DB c mysql_connect localhost dbuser dbpass Lựa chọn DB mysql_select_db dbname Lựa chọn tên DB todo SELECT FROM tagboard order by id desc LIMIT 50 solution mysql_query todo while place mysql_fetch_array solution id place id comments place comments là nơi hiển thị trên trang web b echo place name b echo comments br Chúc bạn thành công Ngày 1 Những câu lệnh cơ bản xử lí chuỗi Code Hàm kiem tra mot chuoi có phai là mot hyperlink function checkLink link if stristr link http return http . link else return link Hàm cat bo khong trong trong chuoi function stripSpaces text replace NULL if is_string replace return str_replace substr replace 0 1 text else return str_replace .

Đã 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.