PHP5 and MySQL® Bible by Tim Converse and Joyce Park with Clark Morgan


Sinopsis

PHP is the Web development language written by and for Web developers. PHP stands for PHP: Hypertext Preprocessor. The product was originally named Personal Home Page Tools, and many people still think that’s what the acronym stands for. But as it expanded in scope, a new and more appropriate (albeit GNU-ishly recursive) name was selected by community vote. PHP is currently in its fifth major rewrite, called PHP5 or just plain PHP.
 
PHP is a server-side scripting language, which can be embedded in HTML or used as a standalone binary (although the former use is much more common). Proprietary products in this niche are Microsoft’s Active Server Pages, Macromedia’s ColdFusion, and Sun’s Java Server Pages. Some tech journalists used to call PHP “the open source ASP” because its functionality is similar to that of the Microsoft product—although this formulation was misleading, as PHP was developed before ASP. Over the past few years, however, PHP and server-side Java have gained momentum, while ASP has lost mindshare, so this comparison no longer seems appropriate.
 
We’ll explore server-side scripting more thoroughly in Chapter 2, but for the moment you can think of it as a collection of super-HTML tags or small programs that run inside your Web pages—except on the server side, before they get sent to the browser. For example, you can use PHP to add common headers and footers to all the pages on a site or to store form-submitted data in a database.

 

Content

  1. PHP: The Basics
  2. Why PHP and MySQL?
  3. Server-Side Web Scripting
  4. Getting Started with PHP
  5. Adding PHP to HTML
  6. Syntax and Variables
  7. Control and Functions
  8. Passing Information between Pages
  9. Strings
  10. Arrays and Array Functions
  11. Numbers
  12. Basic PHP Gotchas
  13. PHP and MySQL
  14. Choosing a Database for PHP
  15. SQL Tutorial
  16. MySQL Database Administration
  17. PHP/MySQL Functions
  18. Displaying Queries in Tables
  19. Building Forms from Queries
  20. PHP/MySQL Efficiency
  21. PHP/MySQL Gotchas
  22. Advanced Features and Techniques
  23. Object-Oriented Programming with PHP
  24. Advanced Array Functions
  25. String and Regular Expression Functions
  26. Filesystem and System Functions
  27. Sessions, Cookies, and HTTP
  28. Types and Type Conversions
  29. Advanced Use of Functions
  30. Mathematics
  31. PEAR
  32. Security
  33. Configuration
  34. Exceptions and Error Handling
  35. Debugging
  36. Connections
  37. PostgreSQL
  38. Oracle
  39. PEAR Database Functions
  40. E-mail
  41. PHP and JavaScript
  42. PHP and Java
  43. PHP and XML
  44. Web Services
  45. Graphics
  46. Case Studies
  47. Weblog
  48. User Authentication
  49. A User-Rating System
  50. A Trivia Game
  51. Converting Static HTML Sites
  52. Data Visualization with Venn Diagrams




Download PDF MySQL®/PHP Database Applications, Second Edition by Brad Bulger, Jay Greenspan, and David Wall


Sinopsis


Soon we will head off on a fabulous journey, a journey on which we will explore the ins and outs of MySQL and PHP database applications in great detail. It’s goingto be a fun trip; we just know it.
 
Okay, maybe we’re being a bit optimistic. If you’re anything like us, points of this particular journey will be a lot more tedious than they are exciting. Let’s face facts: Application development isn’t always the most exciting thing in the world. And as with any other venture that involves programming, some very frustrating times are sure to be ahead, whether because of a syntax error you can’t find or a piece of code that won’t do what you think it ought to do. But despite all that, here you are, and we think there is a very good reason for that.
 
Web applications are the present and the future. No matter your background, whether you have a history with Visual Basic or COBOL, or maybe just some HTML and JavaScript, your résumé is only going to improve with some Web application development experience. We don’t think there’s a better combination of tools to have under your belt than PHP and MySQL. The numbers bear us out. PHP and MySQL are becoming increasingly popular, and the demand for people who can use these tools will only increase.
 
A bit later in this introduction we go into a more detailed explanation of why you should use PHP and MySQL. However, before we can get to that, we want take a bit of time to go over the architecture of Web applications. Once we’ve done this, we can explain in detail why PHP and MySQL should be the centerpieces of your application-development environment. Once we’ve sold you on these tools, we present
a very quick and grossly under-coded application. As you look over this application, you can see the basic syntax and principles behind PHP and MySQL.




Content

  1. Working with MySQL
  2. Database Design with MySQL
  3. The Structured Query Language for Creating and Altering Tables
  4. The Structured Query Language for Inserting, Editing, and Selecting Data
  5. Working with PHP
  6. Getting Started with PHP Variables
  7. Control Structures
  8. PHP’s Built-in Functions
  9. Writing Organized and Readable Code
  10. Simple Applications
  11. Guestbook 2003, the (Semi-)Bulletproof Guestbook
  12. Survey
  13. Not So Simple Applications
  14. Threaded Discussion
  15. Content-Management System
  16. Catalog
  17. Problem-Tracking System
  18. Shopping Cart
  19. XML Parsing
  20. SOAP
  21. Project Management





 

Download PHP Advanced and Object : Oriented Programming Third Edition By Ullman, Larry


Sinopsis

The career of a PHP programmer normally starts with writing individual scripts, each dedicated to a single purpose. From there you begin using more and more files, building up Web applications. Eventually you might develop sites on your own server and, if you’re lucky, balanced over multiple servers. No matter how large your projects are, learning new and improved ways to develop Web applications is an important part of the life of the PHP programmer.

In this chapter, the focus is on developing Web applications beyond the beginner or intermediate level. We begin with an explanation of how to modularize a Web site. Then you’ll learn a bit about the Apache Web server, including using its mod_rewrite feature that makes Search Engine Optimization (SEO)-friendly URLs. The chapter ends with a discussion of controlling the browser caching.

Modularizing a Web Site

In my experience, the arc of a program-mer’s development starts with writing one-page applications that do just a single thing. Over time, the work will evolve into multipage sites, involving templates and state management. After more and more experience, some seasoned PHP developers start doing the same amount of work in fewer pages, such as having the same script both display and handle a form instead of using two separate files. Or, conversely, the advanced PHP programmer may start generating exponentially more scripts, each of which doing far less, by focusing each script on a particular task. This last approach is the premise behind modularizing a Web site.

For an example of modularizing a site, I’ll create a dummy Web site (i.e., it won’t do much) that’s broken into its individual components. The new knowledge here will be how those components are separated, organized, and put back together. Instead of having individual pages (contact.php, about.php, index.php, etc.), the entire application will also be run through one index page. That page will include the appropriate content module based on values passed in the URL.