mainSams Publishing : Sams Teach Yourself PHP in 24 Hours, Third Edition0672326191.hhc0672326191_main.html0672326191_toc.htmlMain PageTable of contentCopyrightAbout the AuthorAcknowledgmentsTell Us What You Think!IntroductionPart I: Getting StartedPart II: The LanguagePart III : Working with PHPPart IV: Extending PHPGlossaryIndexWho Should Read This Book?How This Book Is OrganizedHour 1. PHP: From Home Page to Web EnterpriseHour 2. Installing PHPHour 3. A First ScriptHour 4. The Building BlocksHour 5. Going with the FlowHour 6. FunctionsHour 7. ArraysHour 8. Working with StringsHour 9. ObjectsHour 10. Working with FormsHour 11. Working with FilesHour 12. Working with the DBA FunctionsHour 13. Database Integration—SQLHour 14. Beyond the BoxHour 15. Images On-the-FlyHour 16. Working with Dates and TimesHour 17. Advanced ObjectsHour 18. Working with Regular ExpressionsHour 19. Saving State with Cookies and Query StringsHour 20. Saving State with Session FunctionsHour 21. Working with the Server EnvironmentHour 22. XMLHour 23. PEAR: Reusable Components to Extend the Power of PHPHour 24. Toward a Framework for Larger ProjectsIndex SYMBOLIndex AIndex BIndex CIndex DIndex EIndex FIndex GIndex HIndex IIndex JIndex KIndex LIndex MIndex NIndex OIndex PIndex QIndex RIndex SIndex TIndex UIndex VIndex WIndex XIndex YIndex ZWhat Is PHP?What Need Does PHP Fulfill?What's New in PHP 5The Zend EngineWhy Choose PHP?What's New in This EditionSummaryQ&AWorkshopExercisePlatforms, Servers, Databases, and PHPWhere to Find PHP and MoreInstalling PHP for Linux and ApacheSome 'configure' OptionsConfiguring Apache'php.ini'Help!SummaryQ&AWorkshopExerciseOur First ScriptCombining HTML and PHPAdding Comments to PHP CodeSummaryQ&AWorkshopExerciseVariablesData TypesOperators and ExpressionsConstantsSummaryQ&AWorkshopExercisesSwitching FlowLoopsCode Blocks and Browser OutputSummaryQ&AWorkshopExercisesWhat Is a Function?Calling FunctionsDefining a FunctionReturning Values from User-Defined FunctionsDynamic Function CallsVariable ScopeSaving State Between Function Calls with the 'static' StatementMore About ArgumentsCreating Anonymous FunctionsTesting for Function ExistenceSummaryQ&AWorkshopExerciseWhat Is an Array?Creating ArraysAssociative ArraysMultidimensional ArraysAccessing ArraysManipulating ArraysSorting ArraysFunctions RevisitedSummaryQ&AWorkshopExercisesFormatting StringsInvestigating StringsManipulating StringsSummaryQ&AWorkshopExercisesWhat Is an Object?Creating an ObjectObject PropertiesObject MethodsLimiting Access to Object PropertiesLimiting Access to Object MethodsConstraining Arguments to Methods with HintsInheritanceTesting Classes and ObjectsAutomatically Loading Include Files with '___autoload()'Storing and Retrieving ObjectsSummaryQ&AWorkshopExercisesSuperglobal VariablesThe '$_SERVER' ArrayA Script to Acquire User InputImporting User Input into Global ScopeAccessing Form Input with User-Defined ArraysCombining HTML and PHP Code on a Single PageUsing Hidden Fields to Save StateRedirecting the UserFile Upload Forms and ScriptsSummaryQ&AWorkshopExercisesIncluding Files with 'include()'Using 'include_once()' and 'include_path' to Manage Larger ProjectsTesting FilesCreating and Deleting FilesOpening a File for Writing, Reading, or AppendingReading from FilesReading the Contents of a File with 'file_get_contents()'Writing or Appending to a FileWriting Data to a File with 'file_put_contents()'Working with DirectoriesSummaryQ&AWorkshopExercisesBeneath the AbstractionOpening a DatabaseAdding Data to the DatabaseAmending Elements in a DatabaseReading from a DatabaseDetermining Whether an Item Exists in a DatabaseDeleting an Item from a DatabaseAdding Complex Data Structures to a DatabaseAn ExampleSummaryQ&AWorkshopExercisesA (Very) Brief Introduction to SQLConnecting to the MySQL Database ServerSelecting a DatabaseFinding Out About ErrorsAdAdding Data to a TableAcquiring the Value of an Automatically Incremented FieldAccessing InformationChanging DataSQLite: A Lightweight SQL EngineSelecting DataUsing the PEAR DB PackageSummaryQ&AWorkshopExercisesServer Variables RevisitedA Brief Summary of an HTTP Client/Server NegotiationGetting a Document from a Remote AddressConverting IP Addresses and HostnamesMaking a Network ConnectionSending Mail with the 'mail()' FunctionAn Introduction to StreamsSummaryQ&AWorkshopExercisesChecking Your Configuration with 'gd_info()'Creating and Outputting ImagesAcquiring ColorDrawing LinesApplying Color FillsDrawing an ArcDrawing a RectangleDrawing a PolygonMaking a Color TransparentWorking with TextBringing It TogetherSummaryQ&AWorkshopExercisesGetting the Date with 'time()'Converting a Timestamp with 'getdate()'Converting a Timestamp with 'date()'Creating Timestamps with 'mktime()'An ExampleA Date Pull-down LibrarySummaryQ&AWorkshopExerciseObjects and ConstantsStatic PropertiesStatic MethodsIntercepting Calls to Object Properties and MethodsFinal MethodsCleaning Up Using DestructorsManaging Error Conditions with ExceptionsTools for Building Object HierarchiesPassing and Assigning ObjectsSummaryQ&AWorkshopExercisesPerl Compatible Regular ExpressionsSummaryQ&AWorkshopExerciseCookiesSetting a Cookie with PHPWorking with the Query StringCreating a Query StringSummaryQ&AWorkshopExercisesWhat Are Session Functions?Starting a Session with 'session_start()'Working with Session VariablesDestroying Sessions and Unsetting ElementsPassing Session IDs in the Query StringEncoding and Decoding Session VariablesSummaryQ&AWorkshopExercisesOpening Pipes to and from Processes with 'popen()' and 'proc_open()'Running Commands with 'exec()'Running External Commands with 'system()' or the Backtick OperatorPlugging Security Holes with 'escapeshellcmd()'Running External Applications with 'passthru()'Calling an External CGI Script with the 'virtual()' FunctionSummaryQ&AWorkshopExercisesWhat Is XML?XML Parser FunctionsAn Introduction to the DOM XML FunctionsXSL: A Brief DiscussionIntroducing SimpleXMLSummaryQ&AWorkshopExercisesWhat Is PEAR?Some PEAR Packages in ActionPEAR and Your Own CodeSummaryQ&AWorkshopExercisesPrinciples and ProblemsThe 'Controller' ObjectThe 'RequestHelper' and 'DataStore' ClassesThe 'CommandFactory' ClassThe 'Command' ClassThe 'Dispatcher' ClassWorking with the FrameworkWhere Now, and Was It Worth It?SummaryQ&AWorkshopExercisesTeam LiB