Chapter 1. Introduction to PHP


To use an old chestnut, every journey starts with one small step, and the first step in developing dynamic Web applications with PHsP and MySQL is to learn the fundamentals of the scripting language itself.

Although this book focuses on using MySQL and PHP in combination, you'll do a vast majority of your dynamic Web site legwork using PHP alone. In this and the following chapter, you'll learn its basics, from syntax to variables, operators, and language constructs (conditionals, loops, and whatnots). At the same time you are picking up these fundamentals, you'll also begin developing usable code that you'll integrate into larger applications later in the book.

In this introductory chapter, I'll cruise through most of the basics of the PHP Web scripting language. You'll learn the syntax for coding PHP, how to send data to the Web browser, and how to use two kinds of variables (strings and numbers) plus constants. Some of the examples may seem inconsequential, but they'll demonstrate ideas you'll have to master in order to write more advanced scripts further down the line. Once you comprehend the rules explained over the next 30 or so pages, you'll be ready to start creating your own dynamic Web sites.



    PHP and MySQL for Dynamic Web Sites. Visual QuickPro Guide
    PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    ISBN: 0321336577
    EAN: 2147483647
    Year: 2005
    Pages: 166
    Authors: Larry Ullman

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net