tailieunhanh - The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP phần 10
Mặc dù bạn có được bắn phá với một khối lượng của thông tin, bạn sẽ khám phá ra rằng thật dễ dàng để làm cho tiến bộ nhanh chóng với PHP. Trong chương tiếp theo, bạn sẽ sử dụng hầu hết các kỹ thuật từ chương này để gửi cho người dùng nhập vào từ một hình thức trực tuyến đến hộp thư email của bạn. | THE ESSENTIAL GUIDE TO DREAMWEAVER CS4 WITH CSS AJAX AND PHP Generating the HTML source You can use any HTML structure to populate a Spry data set as long as it presents data in a predictable manner. An existing table or list created in a static web page will do but it s far more efficient to use a recordset. Not only is the data in an organized structure but also the HTML structure is automatically updated whenever changes are made to the database table. To speed things up I have created a SQL file to create the ch19_gallery table and populate it with data. So let s create the table and generate the HTML source for the Spry data sets that will be used for the gallery. Creating the database table The following instructions show you how to load the ch19_gallery table into the dwcs4 database 1. Load phpMyAdmin into your browser and select the dwcs4 database. 2. Select the Import tab and click the Browse button to navigate to in the extras folder of the download files for this book. If you re using MySQL choose instead. 3. Click Go to import the SQL which will create the ch19_gallery table and populate it with data. 4. Select the ch19_gallery table in the navigation frame on the left side of phpMyAdmin. The first few records should look like Figure 19-2. Figure 19-2. The ch19_gallery table contains details of photos of England and Japan. Each record contains the file name dimensions caption and description of a photograph plus the category to which it belongs JPN for Japan and ENG for England. Generating the HTML tables The HTML data source that will be used for the Spry data sets will display the gallery images and thumbnails in plain tables. This exercise shows you how to bind the file names and dimensions of the images to img tags through the Bindings panel. 1. In Dreamweaver create a new PHP page and save it as in workfiles ch19. Give the page the title Photo gallery England. 846 USING SPRY DATA SETS TO .
đang nạp các trang xem trước