This book assumes that you have a basic understanding of HTML and can at least put together a simple, static website, but does not assume that you have any prior knowledge of PHP, MySQL, or JavaScriptalthough if you do, your progress through the book will be even quicker.
Organization of This Book
The chapters in this book are written in a specific order, first introducing all three of the core technologies it covers and then walking you through their installation on a web development server, so that you will be ready to work through the examples.
In the following section, you will gain a grounding in the PHP programming language, covering the basics of syntax, arrays, functions, and object-oriented programming.
Then, with PHP under your belt, you will move on to an introduction to the MySQL database system, where you will learn everything from how MySQL databases are structured up to generating complex queries.
After that, you will learn how you can combine PHP and MySQL to start creating your own dynamic web pages by integrating forms and other HTML features. You will then spend some time looking at ways to speed up your web development using Smarty templates.
In the next three chapters, you will get down to the nitty-gritty practical aspects of PHP and MySQL development by learning a variety of useful functions and how to manage cookies and sessions, as well as how to maintain a high level of security.
In the following four chapters, you will gain a thorough grounding in JavaScript, from simple functions and event handling to accessing the Document Object Model and in-browser validation and error handling.
With an understanding of all three of these core technologies, you will then learn how to make behind-the-scenes Ajax calls and turn your websites into highly dynamic environments .
Finally, youll put together everything youve learned in a complete set of PHP programs that together constitute a fully working social networking website.
Along the way, youll also find plenty of pointers and advice on good programming practices and tips that could help you find and solve hard-to-detect programming errors. There are also plenty of links to websites containing further details on the topics covered.
Supporting Books
Once you have learned to develop using PHP, MySQL, and JavaScript you will be ready to take your skills to the next level using the following reference books:
Dynamic HTML: The Definitive Reference by Danny Goodman (OReilly)
PHP in a Nutshell by Paul Hudson (OReilly)
MySQL in a Nutshell by Russell Dyer (OReilly)
JavaScript: The Definitive Guide by David Flanagan (OReilly)
Conventions Used in This Book
The following typographical conventions are used in this book:
Plain text
Indicates menu titles, options, and buttons.
ItalicIndicates new terms, URLs, email addresses, filenames, file extensions, pathnames, directories, and Unix utilities.
Constant width
Indicates command-line options, variables and other code elements, HTML tags, macros, the contents of files, and the output from commands.
Constant width bold
Shows commands or other text that should be typed literally by the user; also occasionally used for emphasis.
Constant width italic
Shows text that should be replaced with user-supplied values.
Note
This icon signifies a tip, suggestion, or general note.
Warning
This icon indicates a warning or caution.
Using Code Examples
This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless youre reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from OReilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your products documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: Learning PHP, MySQL, and JavaScript , by Robin Nixon. Copyright 2009 Robin Nixon, 978-0-596-15713-5.
If you feel your use of code examples falls outside fair use or the permission given here, feel free to contact us at .
Wed Like to Hear from You
Every example in this book has been tested on various platforms, but occasionally you may encounter problems; for example, if you have a nonstandard installation or a different version of PHP, and so on. The information in this book has also been verified at each step of the production process. However, mistakes and oversights can occur and we will gratefully receive details of any you find, as well as any suggestions you would like to make for future editions. You can contact the author and editors at: