основы PHP

This book is a complete tutorial in PHP's language features and functionality,beginning with the basics and building up to the design and construction of complex data-driven websites. Fully working examples in the book include a directory-style web search engine, a mailing list management, a web based file editor. Anybody who knows HTML can use this book, if you've done any programming, that will be useful, but it's not a requirement.Authors: Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman

This book is aimed at intermediate or advanced Web designers looking to make the leap into server-side programming. You'll be expected to be comfortable with simple HTML, as I'll make use of it without much in the way of explanation. No knowledge of JavaScript is assumed or required, but if you do know JavaScript, you'll find it will make learning PHP a breeze.

By the end of this book, you can expect to have a grasp of what's involved in setting up and building a database-driven Website. If you follow the examples, you'll also learn the basics of PHP (a server-side scripting language that gives you easy access to a database, and a lot more) and Structured Query Language (SQL - the standard language for interacting with relational databases) as supported by MySQL, one of the most popular free database engines available today. Most importantly, you'll come away with everything you need to get started on your very own database-driven site in no time!

Think of this book as your friendly guide to building a Web database application. This book is designed as a reference, not as a tutorial, so you don’t have to read this book from cover to cover, unless you want to. You can start reading at any point in the book - in Chapter 1, Chapter 9, wherever. I divide the task of building a Web database application into manageable chunks of information, so check out the table of contents and locate the topic that you’re interested in. If you need to know information from another chapter to understand the chapter you’re reading, I reference that chapter number.

Here’s a sample of the topics that I discuss in this book:- Building and using a MySQL database- Adding PHP to HTML files- Using the features of the PHP language- Using HTML forms to collect information from users- Showing information from a database in a Web page- Storing information in a database

Think of this book as a friendly introduction to programming in PHP. This book is both an introduction to programming and an introduction to PHP. The book starts with the basics of PHP, including how to tell whether you need to install it. (Full installation instructions are included in Appendix A.) The book describes the basic features of PHP with examples of their use. If you have experience with programming, you can probably just skim this section, but if you don’t, all the programming basics are here. The book goes on to describe the most common uses of PHP. It shows how to write scripts for Web sites, file manipulation, databases, and other common tasks. It provides techniques and shortcuts and warns against common errors. Both beginners and experienced programmers can write useful scripts for many common applications in a very short time by using the information in the application section (Part IV) of the book.

Quite a few books deal with PHP, and a few cover MySQL. We’ve read some of these and found a few to be quite helpful. If you’re looking for a book that deals with the gory details of either of these packages, you should probably look elsewhere. The focus of this book is applications development. We are concerned with what it takes to get data-driven Web sites up and running in an organized and efficient way. The book does not go into arcane detail of every aspect of either of these tools. For example, in this book you will not find a discussion of PHP’s LDAP functions or MySQL’s C application program interface (API). Instead, we focus on the pieces of both packages that affect one another. We hope that by the time you’re done with this book you’ll know what it takes to get an application up and running using PHP and MySQL.

We assume that anyone reading this book has some experience with Web site development conceptsand a basic working knowledge of HTML. Knowledge of other programming languagesbesides PHP is not a prerequisite for this book, but certainly any programming experience youhave will help you understand and apply the concepts. This book is geared toward the “newbie” to these three areas, and we’ve brought many of the conceptsand code snippets to the most basic level. As your experience and comfort level grow withyour knowledge and practical applications, you will find more complex and perhaps more efficientways of doing things. When that happens, you will know that you have come over to thedark side and joined us as PHP, Apache, and MySQL enthusiasts.

This book will show you exactly how to create fantastic web applications that scale well, utilize databases optimally, and connect to a back-end network using a multi-tiered approach. This book also teaches PHP by coding FTP and e-mail clients, advanced data structures, session management, and secure programming.