E-book details

CodeIgniter 2 Cookbook. As a PHP developer, you may have wondered how much difference the Codeigniter framework might make when creating web applications. Now you can find out with a host of customizable recipes ready to insert into your own work

CodeIgniter 2 Cookbook. As a PHP developer, you may have wondered how much difference the Codeigniter framework might make when creating web applications. Now you can find out with a host of customizable recipes ready to insert into your own work

Robert Foster

Ebook
As a developer, there are going to be times when you'll need a quick and easy solution to a coding problem. CodeIgniter is a powerful open source PHP framework which allows you to build simple yet powerful full-feature web applications. CodeIgniter 2 Cookbook will give you quick access to practical recipes and useful code snippets which you can add directly into your CodeIgniter application to get the job done. It contains over 80 ready-to-use recipes that you can quickly refer to within your CodeIgniter application or project.This book is your complete guide to creating fully functioning PHP web applications, full of easy-to-follow recipes that will aid you in any aspect of developing with CodeIgniter. CodeIgniter 2 Cookbook takes you from the basics of CodeIgniter, through e-commerce features for your applications, and ends by helping you ensure that your environment is secure for your users and SEO friendly to draw in customers. Starting with installation and setup, CodeIgniter 2 Cookbook provides quick solutions to programming problems that you can directly include in your own projects. You will be moving through databases, EU Cookie Law, caching, and everything else in-between with useful, ready-to-go recipes. You will look at image manipulation using the Image Manipulation library, user management (building a simple CRUD interface), switching languages on the fly according to the user preference, caching content to reduce server load, and much more.
  • CodeIgniter 2 Cookbook
    • Table of Contents
    • CodeIgniter 2 Cookbook
    • Credits
    • About the Author
    • About the Reviewers
    • www.PacktPub.com
      • Support files, eBooks, discount offers and more
        • Why Subscribe?
        • Free Access for Packt account holders
    • Preface
      • What this book covers
      • What you need for this book
      • Who this book is for
      • Conventions
      • Reader feedback
      • Customer support
        • Downloading the example code
        • Errata
        • Piracy
        • Questions
    • 1. CodeIgniter Basics
      • Introduction
      • Downloading and installing CodeIgniter
        • How to do it...
      • Basic configuration options
        • How to do it...
          • How it works...
        • Managing CodeIgniter on different environments
          • How to do it...
          • How it works...
        • Managing database settings on different environments
          • How to do it...
          • How it works...
            • Common values
            • Other values
        • Securing the system files
          • How to do it...
          • How it works...
        • Removing index.php from the address bar using .htaccess
          • How to do it...
          • How it works...
        • Installing and using Sparks
          • How to do it...
          • How it works...
    • 2. User Management
      • Introduction
        • Database schema
      • Viewing users
        • How to do it...
        • How it works...
      • Creating users
        • How to do it...
        • How it works...
      • Editing users
        • How to do it...
        • How it works...
      • Deleting users
        • How to do it
        • How it works...
      • Generating passwords with CodeIgniter
        • Getting ready
        • How to do it...
        • How it works...
      • Generating passwords with CodeIgniter the bare bones
        • How to do it...
          • Generating a hash
          • Comparing hashed values
        • How it works...
      • Forgot password? resetting passwords with CodeIgniter
        • Getting ready
        • How to do it...
        • How it works...
    • 3. Creating E-commerce Features
      • Introduction
      • Amending configuration settings to run sessions in a database
        • Getting ready
        • How to do it...
        • How it works
          • Categories table
          • Products table
      • Creating a basic cart
        • How to do it...
        • How it works...
          • User browses the catalogue
          • User adds an item to the cart
          • User updates or removes items in the cart
      • Adding and searching by product categories
        • Getting ready
        • How to do it...
        • How it works...
      • Saving the cart to the database
        • How to do it...
        • How it works...
    • 4. Email, HTML Table, and Text Libraries
      • Introduction
      • Sending plain e-mails with CodeIgniter Email
        • How to do it...
        • How it works...
      • Sending HTML e-mails with CodeIgniter Email
        • How to do it...
        • How it works...
      • Sending attachments with CodeIgniter Email
        • How to do it...
        • How it works...
      • Sending bulk e-mails with CodeIgniter Email
        • Getting ready
        • How to do it...
        • How it works...
      • Using an HTML table with DataTable
        • Getting ready
        • How to do it...
        • How it works...
      • Using an HTML table with DataTable and a database
        • Getting ready
        • How to do it...
        • How it works...
      • Using word_limiter() for table output
        • Getting ready
        • How to do it...
        • How it works...
      • Using word_censor() for cleaning input
        • Getting ready
        • How to do it...
        • How it works...
    • 5. Managing Data In and Out
      • Introduction
      • Sending different data to multiple views
        • Getting ready
        • How to do it...
        • How it works...
      • Validating user input
        • Getting ready
        • How to do it...
        • How it works...
      • Preparing user input
        • How to do it...
      • Sticky form elements in CodeIgniter
        • Getting ready
        • How to do it...
        • How it works...
      • Displaying errors next to form items
        • How to do it...
        • How it works...
      • Reading files from the filesystem
        • Getting ready
        • How to do it...
        • How it works...
      • Writing files to the filesystem
        • How to do it...
        • How it works...
      • Creating and downloading ZIP files
        • How to do it...
        • How it works...
      • Uploading files with CodeIgniter
        • Getting ready
        • How to do it...
        • How it works...
        • Theres more...
      • Creating and using validation callbacks
        • How to do it...
        • How it works...
      • Using the language class
        • Getting ready
        • How to do it...
        • How it works...
      • Confirming cookie acceptance from the user
        • Getting ready
        • How to do it...
        • How it works...
        • Theres more...
    • 6. Working with Databases
      • Introduction
      • Configuring CodeIgniter for databases
        • How to do it...
        • How it works...
      • Connecting to multiple databases
        • Getting ready
        • How to do it...
        • How it works...
      • Active Record create (insert)
        • Getting ready
        • How to do it...
        • How it works...
          • The public function create()
          • The public function create_batch()
      • Active Record read (select)
        • Getting ready
        • How to do it...
        • How it works...
      • Active Record update
        • Getting ready
        • How to do it...
        • How it works...
      • ActiveRecord delete
        • Getting ready
        • How to do it...
        • How it works...
      • Looping through the database results
        • Getting ready
        • How to do it...
        • How it works...
      • Counting the number of returned results with num_rows()
        • How to do it...
        • How it works...
      • Counting the number of returned results with count_all_results()
        • How to do it...
      • Query binding
        • Getting ready
        • How to do it...
        • How it works
      • Finding the last insert id
        • How to do it...
        • How it works...
      • Finding the number of affected rows
        • How to do it...
        • How it works...
      • Finding the last database query
        • How to do it...
        • How it works...
      • Using CodeIgniter database migrations
        • Getting ready
        • How to do it...
      • Moving to the current version with current()
        • Getting ready
        • How to do it...
        • How it works...
      • Rolling back/stepping forward with version()
        • Getting ready
        • How to do it...
        • How it works...
      • Generating an XML from a database result
        • Getting ready
        • How to do it...
        • How it works...
      • Generating a CSV from a database result
        • Getting ready
        • How to do it...
          • Forcing download
        • How it works...
          • Saving to file
        • How it works...
        • There's more...
    • 7. Creating a Secure User Environment
      • Introduction
      • Escaping user input
        • Getting ready
        • How to do it...
          • Globally
          • Individually
        • How it works...
      • Preventing cross-site request forgery
        • How to do it...
        • How it works...
      • Escaping data for a database
        • Getting ready
        • How to do it...
        • How it works...
        • There's more...
      • Using HTTPS with CodeIgniter
        • Getting ready
        • How to do it...
        • How it works...
        • There's more...
          • Setting up HTTPS on localhost
    • 8. Calendaring, Right Place, and Right Time
      • Introduction
      • Building a CodeIgniter Calendar helper with database results
        • Getting ready
        • How to do it
        • How it works
      • Building an appointment manager with Calendar Library
        • Getting ready
        • How to do it
        • How it works
          • The public function create()
          • The public function delete()
      • Creating a helper to work with a person's date of birth
        • How to do it
        • How it works
      • Working with fuzzy dates in CodeIgniter
        • How to do it
        • How it works
    • 9. Extending the Core
      • Introduction
      • Using CodeIgniter Sparks
        • Getting ready
        • How to do it...
        • How it works...
      • Creating PDFs with the DOMPDF Spark
        • Getting ready
        • How to do it...
        • How it works...
      • Creating Hooks in CodeIgniter
        • Getting ready
        • How to do it...
      • Clearing dead sessions from the database
        • Getting ready
        • How to do it...
        • How it works...
      • Extending your controllers
        • How to do it...
        • How it works...
      • Uploading a file with FTP
        • Getting ready
        • How to do it...
        • How it works...
      • Creating libraries and giving them access to CodeIgniter resources
        • Getting ready
        • How to do it...
        • How it works...
      • Making your own configuration files and using the settings
        • How to do it...
        • How it works...
      • Using the language class switching language on the go
        • Getting ready
        • How to do it...
        • How it works...
    • 10. Working with Images
      • Introduction
      • Installing ImageMagick on MAC with Cactuslab
        • How to do it...
        • How it works...
      • Uploading images with CodeIgniter
        • How to do it...
        • How it works...
      • Generating thumbnails resizing
        • Getting ready
        • How to do it...
        • How it works...
      • Rotating images
        • Getting ready
        • How to do it...
        • How it works...
      • Cropping images
        • Getting ready
        • How to do it...
        • How it works...
          • Potential errors
      • Adding watermarks with text
        • Getting ready
        • How to do it...
        • How it works...
      • Adding watermarks with image overlays
        • Getting ready
        • How to do it...
        • How it works...
      • Submitting a form with CodeIgniter CAPTCHA
        • Getting ready
        • How to do it...
        • How it works...
    • 11. SEO, Caching, and Logging
      • Introduction
      • Using SEO-friendly URLs in CodeIgniter
        • How to do it...
        • How it works...
      • Using CodeIgniter caching
        • How to do it...
        • How it works...
          • Problems you may encounter
      • Logging errors with CodeIgniter
        • Getting ready
        • How to do it...
        • How it works...
          • Logging style
      • Benchmarking your application
        • Getting ready
        • How to do it...
        • How it works...
    • Index
  • Title: CodeIgniter 2 Cookbook. As a PHP developer, you may have wondered how much difference the Codeigniter framework might make when creating web applications. Now you can find out with a host of customizable recipes ready to insert into your own work
  • Author: Robert Foster
  • Original title: CodeIgniter 2 Cookbook. As a PHP developer, you may have wondered how much difference the Codeigniter framework might make when creating web applications. Now you can find out with a host of customizable recipes ready to insert into your own work.
  • ISBN: 9781782162315, 9781782162315
  • Date of issue: 2013-12-13
  • Format: Ebook
  • Item ID: e_3bji
  • Publisher: Packt Publishing