PHP for Absolute Beginners
PHP is a server-side scripting language that enables you to develop dynamic sites that engage users in ways that are simply not possible using only HTML and CSS. PHP for Absolute Beginners takes a practical approach to teaching you how to build dynamic content for your website using PHP. You’ll quic...
Autores principales: | , |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Berkeley, CA :
Apress
2014.
|
Edición: | 2nd ed. 2014. |
Colección: | Expert's voice in Web development.
|
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009629418306719 |
Tabla de Contenidos:
- Contents at a Glance; Introduction; Part I: PHP/MySQL Basics; Chapter 1: Setting Up a PHP Development Environment; Why You Need Apache, MySQL, and PHP; How PHP Works; Apache and What It Does; Storing Info with MySQL; Installing PHP, Apache, and MySQL; Installing XAMPP; Step 1: Download XAMPP; Step 2: Open the Installer and Follow the Instructions; Step 3: Test XAMPP to Ensure Proper Installation; Open the XAMPP Control Panel; What If Apache Isn't Running?; Verify That Apache and PHP Are Running; Choosing a PHP Editor; Creating Your First PHP File; Running Your First PHP Script; Summary
- Chapter 2: Understanding PHP: Language BasicsEmbedding PHP Scripts; Using echo; What Is a Variable?; Storing Values in a Variable; A Variable Is a Placeholder; Valid PHP Variable Names; Displaying PHP Errors; Creating an HTML5 Page with PHP; Including a Simple Page Template; Returning Values; Including the Template; Commenting Your Code; Block and Single-Line Comments; Avoiding Naming Conflicts; The Object Operator; Using a StdClass Object for Page Data; Object Properties Are Like Variables; Page Views; Making a Dynamic Site Navigation; Passing Information with PHP; Accessing URL Variables
- Using isset( ) to Test If a Variable Is Set_GET, a Superglobal Array; Including Page Views Dynamically; Concatenation; Strict Naming Convention; Displaying a Default Page; Validating Your HTML; Styling the Site with CSS; Declaring a Page_Data Class; Classes Make Objects; Highlighting Current Navigation Item with a Dynamic Style Rule; Taking a Closer Look at the Dynamic CSS; Summary; Chapter 3: Form Management; What Are Forms?; Setting Up a New PHP Project; Seeing for Yourself; Creating a Dynamic Navigation; Creating Page Views for the Form; Displaying Page Views on index.php
- Spending Your Time Wisely: Conventions and ReuseA Super-Simple Search Form; Trying Your Search Form; Forms Encode URL Variables; A Name Attribute Declares the Name of a URL Variable; The Element and Some Common Types; Understanding the Method Attribute; Named PHP Functions; The Basic Syntax for Functions; Using Function Arguments for Increased Flexibility; Creating a Form for the Quiz; Showing the Quiz Form; Using and ; The POST Method; Using the _POST Superglobal; _POST Is an Array; If and Else Explained; Evaluating the Quiz Response
- The Identical Comparison OperatorCurly's Law: Do One Thing; Meaningful Names; Code Is Poetry; Styling Forms; Exercises; Summary; Chapter 4: Building a Dynamic Image Gallery with Image Upload; Setting Up a Dynamic Site; Prerequisites: A Folder with Some Images; Creating a Navigation; Creating Two Dummy Page View Files; Creating the Index File; Time to Test; Adding Two Style Sheets to One Page; Staying DRY; Improving the Page_Data Class with a Method; Is It a Function or a Method?; What Is this?; Using the New Method; You Can Only Use Methods That Are Declared
- Preparing a Function for Displaying Images