PHP 5/MySQL Programming- P83

PHP 5/MySQL Programming- P83:computer programming has often been seen as a difficult and arcane skill. Programming languages are difficult and complicated, out of the typical person’s reach. However, the advent of the World Wide Web has changed that to some extent. It’s reasonably easy to build and post a Web page for the entire world to see. The language of the Web is reasonably simple, and numerous applications are available to assist in the preparation of static pages | 388 PHP 5 MySQL Programming for the Absolute Beginner figure The user can see the newly updated record. figure It s very easy to delete a record. You can tell from this example why it s so important to have a script for generating sample data. I had to delete and modify records several times when I was testing the system. After each test I easily restored the database to a stable condition by reloading the file with the MySQL SOURCE command. 389 Adding a Record Adding a record to the table is a multistep process much like editing a record. The first page shown in Figure allows you to enter data in all the appropri ate fields. FIGURE The add screen includes list boxes for foreign key references. Like the Edit Record screen the Add Record page does not allow the user to directly enter a primary key. This page also automatically generates drop-down SELECT boxes for foreign key fields like operationlD. Processing the Add When the user chooses to process the add another page confirms the add or describes the failure if it cannot add the record . This confirmation page is shown in Figure . Building the Design of the SpyMaster System It can be intimidating to think of all the operations in the SpyMaster system. The program has a lot of functionality. It could be overwhelming to start coding this system without some sort of strategic plan. Chapter 12 Building a Three-Tiered Data Application 390 PHP 5 MySQL Programming for the Absolute Beginner figure The user has successfully added an agent. Creating a State Diagram Complex programming problems have many approaches. For this particular problem I decided to concentrate on the flow of data through a series of modules. Figure shows my overall strategy. FIGURE A state diagram of the SpyMaster system. The illustration in Figure is sometimes called a state diagram. This kind of illustration identifies what particular problems need to be solved and indicates modules that

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã 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.