مشخصات کتاب
-
David Powers
-
2005
-
انگلیسی
-
2405
-
459
-
0
دانلود رایگان کتاب Foundation PHP 5 for Flash
این نسخه ی بازنویسی شده از کتاب Foundation PHP for Flash ، سه مورد از معروف ترین تکنولوژی های روز دنیا را معرفی می کند: Flash، زبان سمت سرور PHP، و سیستم دیتابیس MySQL. با مطالعه ی این کتاب آموزش برنامه نویسی می توانید مطمئن باشید که با آخرین استانداردهای روز دنیا سر و کار خواهید داشت؛ ولی با این وجود، در صورتی که اپلیکیشن شما بر روی سرورهای قدیمی تری مستقر شود نیز دچار وقفه یا خرابی نخواهد شد. این کتاب همچنین مقدمه ای در باب سیستم دیتابیسی جایگزین (SQLite) را ارئه می کند که در حال حاضر با PHP 5 به صورت اتوماتیک bundle می شود و نیاز به مرحله ی نصب و راه اندازی ندارد.
در هر فصل از این کتاب آموزش php حوزه های جدید PHP/MySQL در اختیار کاربر قرار می گیرد، و ضمن ارائه ی syntax، نشان می دهد که به چه نحوی با ActionScript قابل قیاس بوده و چگونه به منظور ساخت اپلیکیشن های پیچیده، با Flash ترکیب می شود. برای مثال، فصل های اول مواردی از قبیل چگونگی دستیابی به داده از PHP به Flash یا بعکس، متغیرها (variables)، آرایه ها، دستکاری رشته ها، اعتبارسنجی ورودی کاربر، و فرم های feedback را پوشش می دهند. در ادامه، به مباحث پیچیده تری از قبیل ساخت دیتابیس ها به وسیله ی کنسول MySQL و یا ابزار phpMyAdmin، دستکاری داده های دیتابیس از طریق Flash interface، نمایش داده های موجود در یک RSS Feed بر روی Flash، پایداری داده ها از طریق جلسات (sessions)، و ایجاد یک سیستم تمام عیار مدیریت محتوا، پرداخته می شود.
علاوه بر این، کتاب Foundation PHP 5 for Flash راهنمایی های مفصلی در رابطه با نحوه ی راه اندازی محیط PHP، MySQL، و یا سرور Apache را، در کنار اطلاعات عیب یابی (troubleshooting)، در اختیار کاربر قرار می دهد. PHP زبان منتخب حدود 18 میلیون دامین (domain) می باشد، و MySQL نیز حدود 5 میلیون کاربر فعال از قبیل پیشروان صنعت مانند Google، Associated Press، Sony، و NASA دارد. این تکنولوژی ها به صورت مجانی و دارای منبع باز (open source) می باشند، و البته با مطالعه ی این کتاب درخواهید یافت که یادگیری این تکنولوژی ها بسیار آسان و سرگرم کننده می باشد.
Our original Foundation PHP for Flash title was rightly regarded as a must-have when it came to wanting to learn just how to make your Flash sites make use of backend technologies, that was published way back in the days of Flash 5 and PHP 4, and things move pretty fast in the world of web design!
This latest, completely rewritten, edition again brings together three of the web's hottest technologies—Flash, the server-side language PHP, and the MySQL database system. We've brought things back up to date, using ActionScript 2.0, PHP 5.0, and MySQL 4.1, the book has been designed to be version-neutral. In other words, you can be confident that you're working with the latest standards, but that your applications won't break if deployed on an older server. The book also provides a brief introduction to an alternative database system, SQLite, which is now automatically bundled with PHP 5 and requires no installation.
At each stage of the book you'll be given an overview of a new area of PHP/MySQL, introducing you to the syntax while showing how it compares to ActionScript, and how it integrates with Flash to produce increasingly complicated applications. For example, earlier chapters cover things such as getting data from PHP to Flash and back again, variables, arrays, string manipulation, validating user input, and feedback forms. Later on, it moves on to more advanced subjects such as creating databases via the MySQL console and via phpMyAdmin, manipulating database data via a Flash interface, displaying data from an RSS feed in Flash, persisting data with sessions, and creating a full blown content management system.
In addition, to get you up and running, the book features a detailed guide to setting up your environment—PHP, MySQL, and the Apache web server—along with extensive troubleshooting information.
PHP is the language of choice on nearly 18 million domains, and MySQL has more than five million active users, including industry leaders like Google, the Associated Press, Sony, and NASA. They're open-source and free; and with the help of this book, you'll see that they're easy and fun to learn.
About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Chapter 1: Getting Ready to Work with PHP . . . . . . . . . . . . . . . . . . . 1
Accessing external data with Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Choosing the right technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
What PHP, Apache, and MySQL have to offer . . . . . . . . . . . . . . . . . . . . . . . 4
How everything fits together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
PHP and ActionScript: Distant cousins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Installing the necessary software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Setting up on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Setting up on Mac OS X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Setting up your work environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Getting a first taste of the power of PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Chapter 2: Flash Breaks Free . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Communicating with external sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Taking first steps in PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
How PHP fits into web design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
The basic grammar of PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Sending feedback from Flash by email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Progress so far . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Chapter 3: Calculations and Decisions . . . . . . . . . . . . . . . . . . . . . . . . 85
Performing calculations with PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Working with arithmetic operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Useful math functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Performing calculations in the right order . . . . . . . . . . . . . . . . . . . . . . . . 93
Combining calculations and assignment . . . . . . . . . . . . . . . . . . . . . . . . . 95
Making decisions with PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Using if… else conditional statements . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Using comparison operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Testing more than one condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Using switch for long decision chains . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Using the conditional operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Flash application: A multiconverter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Planning the conversion script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Building the Flash interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Summing up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Chapter 4: Of Strings and Things . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Manipulating strings with PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
How PHP outputs strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Changing case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Working with substrings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Modularizing code with functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Understanding where PHP functions run . . . . . . . . . . . . . . . . . . . . . . . . 145
Why roll your own? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Understanding how PHP and ActionScript functions handle variables . . . . . . 147
Returning a value from a function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Deciding where to put functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Completing the multiconverter script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Formatting the main measurement units . . . . . . . . . . . . . . . . . . . . . . . . 152
Handling gallons, pints, and liters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Dealing with kilograms, pounds, and stones . . . . . . . . . . . . . . . . . . . . . . 160
Handling meters to feet and yards . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Reviewing the multiconverter project . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Taking the project further . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Dealing with user input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Trimming leading and trailing whitespace . . . . . . . . . . . . . . . . . . . . . . . 164
Stripping HTML tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Removing backslashes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Using regular expressions to identify patterns . . . . . . . . . . . . . . . . . . . . . 166
Fine-tuning the feedback application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
A pause for breath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Chapter 5: Working Smarter with Arrays and Loops . . . . . . . . . . . . 177
Understanding the basics of arrays and loops . . . . . . . . . . . . . . . . . . . . . . . . . 178
Organizing items in arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Grouping similar items in multidimensional arrays . . . . . . . . . . . . . . . . . . 179
Using loops for repetitive tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Creating arrays in PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Indexed arrays: Organizing by number . . . . . . . . . . . . . . . . . . . . . . . . . 181
Associative arrays: Organizing by name . . . . . . . . . . . . . . . . . . . . . . . . . 184
Array length: Key to understanding the difference between
PHP and ActionScript arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Multidimensional arrays: Nesting arrays . . . . . . . . . . . . . . . . . . . . . . . . . 189
Zipping through repetitive tasks with loops . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Looping through arrays with foreach . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Using the versatile for loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Simple loops with while and do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Breaking out of loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Nesting loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Passing information securely with $_POST . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Why register_globals is so important . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Manipulating arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Slicing and splicing arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Sorting arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Building an RSS feed aggregator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
What an RSS feed does . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Taking a look inside an RSS feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Parsing an RSS feed with MagpieRSS . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Displaying the merged RSS feed in Flash . . . . . . . . . . . . . . . . . . . . . . . . 223
Eliminating HTML entities that Flash cannot handle . . . . . . . . . . . . . . . . . 229
Deploying the feed aggregator on the Internet . . . . . . . . . . . . . . . . . . . . 230
Progress report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Chapter 6: PHP and Databases: Packing Real Power
Behind Your Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Why MySQL? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
MySQL’s shortcomings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
MySQL’s strengths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Choosing the right version of MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Choosing the right license and cost . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Considering SQLite as an alternative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
SQLite’s strengths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
SQLite’s shortcomings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Choosing the right database system . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Installing MySQL on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Changing the default table type on Windows Essentials . . . . . . . . . . . . . . . 253
Starting and stopping MySQL manually on Windows . . . . . . . . . . . . . . . . . 255
Launching MySQL Monitor on Windows . . . . . . . . . . . . . . . . . . . . . . . . 257
Configuring MySQL on Mac OS X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Working with MySQL Monitor (Windows and Mac) . . . . . . . . . . . . . . . . . . . . . 261
Creating your first database in MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Loading data from an external file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Using MySQL with a graphical interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
phpMyAdmin: A golden oldie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
MySQL Administrator and MySQL Query Browser: Smart new kids
on the block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Looking ahead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Chapter 7: Playing with Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Building the game’s graphical elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Using PHP to communicate with the database . . . . . . . . . . . . . . . . . . . . . . . . 291
A touch of class to emulate mysqli on all setups . . . . . . . . . . . . . . . . . . . 292
Using the mysqli object-oriented interface . . . . . . . . . . . . . . . . . . . . . . . 292
Building and using PHP 5 classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Naming and declaring classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Creating class properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Using the constructor function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Setting class methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Accessing public methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Refining the word selection with SQL and PHP . . . . . . . . . . . . . . . . . . . . . . . . 313
Building a scoring mechanism that remembers . . . . . . . . . . . . . . . . . . . . . . . . 322
Introducing the Flash SharedObject . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Other ways to enhance the game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Handling database failures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Setting different skill levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
SQLite: An alternative database system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
SQLite basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Making sure SQLite has the right permissions . . . . . . . . . . . . . . . . . . . . . 333
Rewriting the Hangman PHP script for SQLite . . . . . . . . . . . . . . . . . . . . . 341
Comparing MySQL and SQLite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Ever onward and upward . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Chapter 8: Creating a User Registration Database . . . . . . . . . . . . . 345
Understanding database types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Keeping things simple with flat-file databases . . . . . . . . . . . . . . . . . . . . . 346
Gaining greater flexibility with relational databases . . . . . . . . . . . . . . . . . 348
Understanding MySQL storage formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Choosing the right column type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Column types in MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Default values and NULL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Choosing the right language settings . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Building a user registration system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
Registering users with MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
What if it doesn’t work? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
Time to take stock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
Chapter 9: Protecting Your Data with Sessions . . . . . . . . . . . . . . . . 387
Keeping track with PHP sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
The Web is a stateless environment . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
How sessions work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
PHP session basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Using sessions to restrict access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Other uses for sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
Chapter 10: Keeping Control with a Content
Management System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
The four essential SQL commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
SELECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
INSERT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
UPDATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
DELETE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
Building a simple content management system . . . . . . . . . . . . . . . . . . . . . . . . 411
Building the content management interface . . . . . . . . . . . . . . . . . . . . . . 412
Scripting the application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
Securing the content management system . . . . . . . . . . . . . . . . . . . . . . . 466
Adding an extra column to a table . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
A solid foundation has been laid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
Chapter 11: Working with Dates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
How ActionScript, PHP, and MySQL handle dates . . . . . . . . . . . . . . . . . . . . . . . 474
Navigating the minefield of incompatible timestamps . . . . . . . . . . . . . . . . 475
Creating a timestamp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
Formatting dates in PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
Working with dates in MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
Using dates in calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
Finding and creating records based on temporal criteria . . . . . . . . . . . . . . 493
Handling dates in user input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
Formatting dates from text input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
Checking a date’s validity with PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
Building a Flash date selector for MySQL . . . . . . . . . . . . . . . . . . . . . . . . 498
Nearly there . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510
Chapter 12: Working with Multiple Tables and XML . . . . . . . . . . . . 513
Designing the table structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
Deciding the basic requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
Normalizing the tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515
Preparing to build the bookstore database . . . . . . . . . . . . . . . . . . . . . . . 518
Getting an overview of the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
Completing the database structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
Creating the content management system . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
Deciding the basic structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
Activating the forms with PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545
Retrieving data from more than one table . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
Avoiding ambiguous column references . . . . . . . . . . . . . . . . . . . . . . . . 569
Using a full join . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
Using a left join to find an incomplete match . . . . . . . . . . . . . . . . . . . . . 572
Completing the content management system . . . . . . . . . . . . . . . . . . . . . . . . . 574
Managing existing book records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
Deleting records from more than one table . . . . . . . . . . . . . . . . . . . . . . 585
Maintaining referential integrity on deletion . . . . . . . . . . . . . . . . . . . . . . 587
Updating multiple records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594
Using SimpleXML to parse an XML feed . . . . . . . . . . . . . . . . . . . . . . . . . 596
Securing your CMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
Displaying the database contents in Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
Getting the database ready . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
Communicating with the database through PHP . . . . . . . . . . . . . . . . . . . 602
Building the Flash interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608
Creating the ActionScript to load results from the database . . . . . . . . . . . . 609
A long road traveled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
Appendix A: When Things Go Wrong with PHP and MySQL . . . . . . 619
Appendix B: Converting Applications to ActionScript 1.0 . . . . . . . . 641
Appendix C: Installing Older Versions of MySQL on Windows . . . . 647
Appendix D: Using Languages Other Than English in MySQL . . . . . 657
Appendix E: Essential MySQL Maintenance . . . . . . . . . . . . . . . . . . . 667
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
دانلود کتاب Beginning PHP and MySQL 3
نویسنده این کتاب دارای بیش از 10 سال تجربه کار در زمینه آموزش برنامه نویسی با این فن آوری ها می باشد، و این کتاب را با نمونه های عملی و بینشی عمیق و وسیع تهیه کرده است. بر این اساس، به شما توصیه می کنیم که به این کتاب به عنوان کتابی مرجع در زمینه آموزش php نگاه کنید
نویسنده: W. Jason Gilmore
زبان: انگلیسی
دانلود کتاب Beginning PHP and MySQL E-Commerce
کتابBeginning PHP and MySQL E-Commerce مراحل گام به گام طراحی و ساخت اپلیکیشن قابل گسترش برای یک وبسایت تجاری را آموزش می دهد. این کتاب با ارائه ی مثال واقعی از یک وبسایت فروش تی شرت، به شما می آموزد که چگونه می توانید یک کاتالوگ محصولات را ایجاد و کنترل نمایید
نویسنده: Cristian Darie و Emilian Balanescu
زبان: انگلیسی
دانلود کتاب Practical Web 2.0 Applications with PHP
در این کتاب، تکنولوژی های مربوط به توسعه ی زبان های PHP، MySQL، CSS، HTML، و JavaScrip/Ajax، در کنار هم ارائه شده اند تا به شما نشان دهند چگونه می توان اپلیکیشن های بسیار چشم گیری را، از لحظه ی طراحی و برنامه نویسی گرفته تا اجرای نهایی کد، و بدون نیاز به اصول غیر ضروری دیگر که عمدتا شما را به سمت عقب سوق می دهند، ایجاد نمود.
نویسنده: Quentin Zervaas
زبان: انگلیسی