PHP & MySQL: Novice to Ninja, 7th Edition
by Tom Butler
- Length: 680 pages
- Edition: 7
- Language: English
- Publisher: SitePoint
- Publication Date: 2022-03-08
- ISBN-10: 1925836460
- ISBN-13: 9781925836462
- Sales Rank: #5266860 (See Top 100 Books)
PHP & MySQL: Novice to Ninja, 7th Edition is a hands-on guide to learning all the tools, principles, and techniques needed to build a professional web application using PHP & MySQL. Comprehensively updated to cover PHP 8 and modern best practice, this highly practical and fun book covers everything from installation through to creating a complete online content management system.
- Gain a thorough understanding of PHP syntax
- Master database design principles and SQL
- Write robust, maintainable, best practice code
- Build a working content management system (CMS)
- And much more!
PHP MySQL: Novice to Ninja, 7th Edition Notice of Rights Notice of Liability Trademark Notice About SitePoint About the Author Preface Who Should Read This Book Programming Has Changed It Takes 10,000 Hours to Become an Expert Resist the Temptation to Skip Ahead The Concorde Fallacy You’re Not Learning PHP Getting Braces and Semicolons in the Right Place Is the Easy Part You Won’t Get Anything Done by Planning Okay, Design Isn’t All Bad Conventions Used Code Samples Tips, Notes, and Warnings Where to Find Help The SitePoint Forums The Code Archive Your Feedback Let’s Go Chapter 1: Installation Your Own Web Server Server Setup 1: Manually Installing All the Software Components Server Setup 2: Pre-packaged Installations Server Setup 3: Virtual Servers Server Setup 4: Docker Getting Started Installation on Windows Installation on macOS Installation on Linux Getting Started with Docker Connecting to the Server and Creating Your First File We’re All Set Up Chapter 2: Introducing PHP Basic Syntax and Statements Variables, Operators, and Comments Variables Operators Control Structures If Statements Loops Arrays User Interaction and Forms Passing Variables in Links Passing Variables in Forms Hiding the Seams PHP Templates Security Concerns Many Templates, One Controller Bring On the Database Chapter 3: Introducing MySQL An Introduction to Databases MySQL Using MySQL Workbench to Run SQL Queries Creating a Database Structured Query Language Creating a Table Adding Data A Word of Warning Viewing Stored Data Modifying Stored Data Deleting Stored Data Let PHP Do the Typing Chapter 4: Publishing MySQL Data on the Web The Big Picture Creating a MySQL User Account Connecting to MySQL with PHP A Crash Course in Object-oriented Programming Configuring the Connection Sending SQL Queries with PHP Handling SELECT Result Sets Thinking Ahead Inserting Data into the Database Magic Quotes Prepared Statements Deleting Data from the Database Mission Accomplished Chapter 5: Relational Database Design Giving Credit Where Credit Is Due Rule of Thumb: Keep Entities Separate SELECT with Multiple Tables Simple Relationships Many-to-many Relationships One for Many, and Many for One Chapter 6: Structured PHP Programming Include Files Including HTML Content Including PHP Code Types of Includes Custom Functions and Function Libraries Variable Scope Breaking Up Your Code into Reusable Functions Using Functions to Replace Queries Updating Jokes Editing Jokes on the Website Delete Function Select Function The Best Way Chapter 7: Improving the Insert and Update Functions Improving the Update Function Improving the Insert Function Handling Dates Displaying the Joke Date Making Your Own Tools Generic Functions Using These Functions Repeated Code Is the Enemy Creating a Page for Adding and Editing Further Polishing Moving Forward Chapter 8: Objects and Classes Time for Class Public vs Private Protected Objects Class Variables Constructors Type Hinting Private Variables Constructor Property Promotion Using the DatabaseTable Class Updating the Controller to Use the Class DRY Creating a Controller Class Single Entry Point Keeping it DRY Template Variables Be Careful with extract Summary Chapter 9: Creating an Extensible Framework Search Engine Optimization Thinking Ahead: User Registration 1. Include the Relevant Controller 2. Create an Instance of the Controller Dependencies 3. Call the Action on the Correct Controller Done URL Rewriting Tidying Up Make it OOP Reusing Code on Different Websites Generic or Project-specific? Making EntryPoint Generic Autoloading Case Sensitivity Implement an Autoloader Redecorating Namespaces Autoloading with PSR-4 And the REST Non-web Applications Enforcing Dependency Structure with Interfaces Error Handling Your Own Framework Chapter 10: Allowing Users to Register Accounts Validating Email Addresses Preventing the Same Person from Registering Twice Securely Storing Passwords Registration Complete Chapter Summary Chapter 11: Cookies, Sessions, and Access Control Cookies PHP Sessions Counting Visits with Sessions Access Control Logging In Protected Pages Creating a Login Form Logging Out Assigning Added Jokes to the Logged-in User User Permissions Mission Accomplished? The Sky’s the Limit Chapter 12: Relationships Object Relational Mappers Public Properties Methods in Entity Classes Using Entity Classes from the DatabaseTable Class Joke Objects Using the Joke Class References Simplifying the List Controller Action Tidying Up Caching Joke Categories List Page Assigning Jokes to Categories Assigning Categories to Jokes Displaying Jokes by Category Editing Jokes User Roles Creating a Form to Assign Permissions Author List Edit Author Permissions Setting Permissions Storing Permissions in the Database A Crash Course in Binary Be Bit-wise Back to PHP Storing Bitwise Permissions in the Database Join Table and Bitwise Approaches: Pros and Cons Cleaning Up Editing Other People’s Jokes Phew! Chapter 13: Content Formatting and Pagination Regular Expressions String Replacement with Regular Expressions Emphasized Text Paragraphs Hyperlinks Putting It All Together Sorting, Limiting and Offsets Sorting Pagination with LIMIT and OFFSET Pagination in Categories Achievement Unlocked: Ninja What Next?
Donate to keep this site alive
To access the Link, solve the captcha.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.