Coming from a OOP language perspective, I was trying to get up to speed with PHP programming while learning Drupal module development and theming. I wanted something to familiarize myself with PHP and this book was it. Excellent explanation, very detail-oriented, and the examples are clear and concise. The only complaint I have is on the cookies chapter where the code pieces are a bit broken up and you're not really sure how much more code you need to complete those examples. But other that, I'm very happy with it and would recommend it to anyone looking to dwell into PHP. Table of Contents 6 Introduction 10 Chapter 1: Getting Started with PHP 26 Basic XHTML Syntax 27 Basic PHP Syntax 32 Testing Your Script 35 Sending Text to the Browser 41 Sending HTML to the Browser 45 Using White Space 47 Adding Comments to Scripts 50 Basic Debugging Steps 53 Chapter 2: Variables 56 What Are Variables? 57 Variable Syntax 61 Types of Variables 63 Assigning Values to Variables 66 Understanding Quotation Marks 69 Chapter 3: HTML Forms and PHP 72 Creating a Simple Form 73 Using GET or POST 77 Receiving Form Data in PHP 79 Displaying Errors 84 Error Reporting 87 Manually Sending Data to a Page 90 Chapter 4: Using Numbers 96 Creating the Form 97 Performing Arithmetic 100 Formatting Numbers 105 Understanding Precedence 107 Incrementing and Decrementing a Number 109 Creating Random Numbers 111 Chapter 5: Using Strings 114 Creating the HTML Form 115 Connecting Strings (Concatenation) 118 Handling Newlines 122 HTML and PHP 124 Encoding and Decoding Strings 128 Finding Substrings 133 Replacing Parts of a String 137 Chapter 6: Control Structures 140 Creating the HTML Form 141 The if Conditional 146 Validation Functions 149 Using else 152 More Operators 155 Using elseif 163 The Switch Conditional 167 The for Loop 171 Chapter 7: Using Arrays 176 What Is an Array? 177 Creating an Array 179 Adding Items to an Array 183 Accessing Array Elements 186 Creating Multidimensional Arrays 190 Sorting Arrays 195 Transforming Between Strings and Arrays 199 Creating an Array from a Form 204 Chapter 8: Creating Web Applications 210 Creating Templates 211 Using External Files 219 Using Constants 225 Working with the Date and Time 230 Handling HTML Forms with PHP, Revisited 233 Making Forms Sticky 239 Sending Email 247 Output Buffering 252 Manipulating HTTP Headers 256 Chapter 9: Cookies and Sessions 262 What Are Cookies? 263 Creating Cookies 266 Reading from Cookies 273 Adding Parameters to a Cookie 279 Deleting a Cookie 284 What Are Sessions? 287 Creating a Session 288 Accessing Session Variables 292 Deleting a Session 294 Chapter 10: Creating Functions 296 Creating and Using Simple Functions 297 Creating and Calling Functions That Take Arguments 304 Setting Default Argument Values 308 Creating and Using Functions That Return a Value 311 Understanding Variable Scope 316 Chapter 11: Files and Directories 322 File Permissions 323 Writing to Files 328 Locking Files 336 Reading from Files 339 Handling File Uploads 342 Navigating Directories 350 Creating Directories 356 Reading Files Incrementally 364 Chapter 12: Intro to Databases 370 Introduction to SQL 371 Connecting to MySQL 373 MySQL Error Handling 377 Creating and Selecting a Database 380 Creating a Table 383 Inserting Data into a Database 388 Securing Query Data 393 Retrieving Data from a Database 396 Deleting Data in a Database 402 Updating Data in a Database 408 Chapter 13: Regular Expressions 416 What Are Regular Expressions? 417 Matching Patterns 419 Using Literals 424 Using Metacharacters 425 Using Quantifiers 427 Using Classes 429 Matching and Replacing Patterns 431 Appendix A: Installation and Configuration 436 Installation on Windows 437 Installation on Mac OS X 440 Using the MySQL Client 444 Creating MySQL Users 447 PHP Configuration 453 Appendix B: Resources and Next Steps 456 Online PHP Resources 457 Database Resources 460 Top Ten Frequently Asked Questions (or Problems) 461 Next Steps 465 Tables 467 Index 470 A 470 B 470 C 470 D 471 E 472 F 472 G 473 H 473 I 473 J 473 K 473 L 473 M 474 N 474 O 474 P 475 Q 476 R 476 S 476 T 478 U 478 V 478 W 479 X 479 Y–Z 479 This is the eBook version of the printed book. If the print book includes a CD-ROM, this content is not included within the eBook version. With PHP for the World Wide Web, Third Edition: Visual QuickStart Guide, readers can start from the beginning to get a tour of the programming language, or look up specific tasks to learn just what they need to know. This task-based visual reference guide uses step-by-step instructions and plenty of screenshots to teach beginning and intermediate users this popular open-source scripting language. Leading technology author Larry Ullman guides readers through the new features in PHP 6, focusing primarily on improved support for handling any language in a Web site. Other addressed changes include removal of outdated and insecure features, plus new functions and more efficient ways to tackle common needs. Both beginning users, who want a thorough introduction to the technology, and more intermediate users, who are looking for a convenient reference, will find what they need here--in straightforward language and thorough readily accessible examples.
with Php For The World Wide Web, Third Edition: Visual Quickstart Guide, Readers Can Start From The Beginning To Get A Tour Of The Programming Language, Or Look Up Specific Tasks To Learn Just What They Need To Know. This Task-based Visual Reference Guide Uses Step-by-step Instructions And Plenty Of Screenshots To Teach Beginning And Intermediate Users This Popular Open-source Scripting Language. Leading Technology Author Larry Ullman Guides Readers Through The New Features In Php 6, Focusing Primarily On Improved Support For Handling Any Language In A Web Site. Other Addressed Changes Include Removal Of Outdated And Insecure Features, Plus New Functions And More Efficient Ways To Tackle Common Needs. Both Beginning Users, Who Want A Thorough Introduction To The Technology, And More Intermediate Users, Who Are Looking For A Convenient Reference, Will Find What They Need Herein Straightforward Language And Thorough Readily Accessible Examples.
Need to learn PHP fast? Try a" Visual QuickStart"! This best-selling reference's visual format and step-by-step, task-based instructions will have you up and running with the PHP scripting language in no time! In this completely updated edition of our best-selling guide "PHP for the World Wide Web: Visual QuickStart Guide," leading Web scripting expert Larry Ullman uses crystal-clear instructions and friendly prose to introduce you to everything that's new in PHP. Filled with step-by-step, task-based instructions and loads of visual aids, this book explains how to learn the ins and outs of this important and popular scripting language. Along the way, you' ll find extensive coverage of all the language's new features: including a complete rewrite of date handling code, with improved time-zone support, important security fixes, and over 30 new functions in various extensions and built-in functionality This visual, task-based guide seeks to get users running with the basics of PHP. Topics covered include basic syntax, testing scripts, working with variables and creating Web applications. Sample scripts and projects are used throughout Teach yourself PHP the quick and easy way! This Visual QuickStart Guide uses pictures rather than lengthy explanations. You'll be up and running in no time!