Lengstorf / Blom Hansen | PHP for Absolute Beginners | E-Book | www.sack.de
E-Book

E-Book, Englisch, 256 Seiten

Reihe: Professional and Applied Computing

Lengstorf / Blom Hansen PHP for Absolute Beginners


2. Auflage 2014
ISBN: 978-1-4302-6814-7
Verlag: APRESS
Format: PDF
Kopierschutz: 1 - PDF Watermark

E-Book, Englisch, 256 Seiten

Reihe: Professional and Applied Computing

ISBN: 978-1-4302-6814-7
Verlag: APRESS
Format: PDF
Kopierschutz: 1 - PDF Watermark



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. takes a practical approach to teaching you how to build dynamic content for your website using PHP. You’ll quickly get started with practical PHP projects, learning how to build a dynamic image gallery. By the end of the book you’ll will have developed a personal blog complete with a password protected admin module.

won't swamp you with every detail of the full PHP language up front – instead, you’ll be introduced to a small, versatile subset of PHP and learn to use it creatively to develop dynamic web sites. In the process you will learn to use variables, control structures, functions, and objects to your advantage. You will learn how to plan and create databases and how to organize your PHP scripts beautifully. At the end of the book, you will be a confident PHP user, ready to take the next steps in creating great websites.

Lengstorf / Blom Hansen PHP for Absolute Beginners jetzt bestellen!

Zielgruppe


Popular/general

Weitere Infos & Material


1;Contents at a Glance;3
2;Contents;225
3;About the Authors;234
4;About the Technical Reviewer;235
5;Acknowledgments;236
6;Introduction;4
7;Part I: PHP/MySQL Basics;5
7.1;Chapter 1: Setting Up a PHP Development Environment;6
7.1.1;Why You Need Apache, MySQL, and PHP;6
7.1.1.1;How PHP Works;7
7.1.1.2;Apache and What It Does;7
7.1.1.3;Storing Info with MySQL;7
7.1.2;Installing PHP, Apache, and MySQL;8
7.1.2.1;Installing XAMPP;8
7.1.2.1.1;Step 1: Download XAMPP;8
7.1.2.1.2;Step 2: Open the Installer and Follow the Instructions;8
7.1.2.1.3;Step 3: Test XAMPP to Ensure Proper Installation;13
7.1.2.2;Open the XAMPP Control Panel;13
7.1.2.3;What If Apache Isn’t Running?;14
7.1.2.4;Verify That Apache and PHP Are Running;15
7.1.3;Choosing a PHP Editor;15
7.1.4;Creating Your First PHP File;16
7.1.5;Running Your First PHP Script;17
7.1.6;Summary;18
7.2;Chapter 2: Understanding PHP: Language Basics;19
7.2.1;Embedding PHP Scripts;20
7.2.1.1;Using echo;21
7.2.1.2;What Is a Variable?;21
7.2.1.2.1;Storing Values in a Variable;21
7.2.1.2.2;A Variable Is a Placeholder;21
7.2.1.2.3;Valid PHP Variable Names;22
7.2.1.3;Displaying PHP Errors;22
7.2.2;Creating an HTML5 Page with PHP;23
7.2.2.1;Including a Simple Page Template;24
7.2.2.2;Returning Values;24
7.2.2.3;Including the Template;24
7.2.2.4;Commenting Your Code;25
7.2.2.4.1;Block and Single-Line Comments;25
7.2.2.5;Avoiding Naming Conflicts;25
7.2.2.5.1;The Object Operator;26
7.2.2.5.2;Using a StdClass Object for Page Data;26
7.2.2.5.3;Object Properties Are Like Variables;27
7.2.3;Page Views;27
7.2.3.1;Making a Dynamic Site Navigation;27
7.2.3.2;Passing Information with PHP;28
7.2.3.3;Accessing URL Variables;29
7.2.3.4;Using isset(?) to Test If a Variable Is Set;29
7.2.3.5;$_GET, a Superglobal Array;29
7.2.3.6;Including Page Views Dynamically;30
7.2.3.7;Concatenation;31
7.2.3.8;Strict Naming Convention;31
7.2.3.9;Displaying a Default Page;31
7.2.4;Validating Your HTML;32
7.2.5;Styling the Site with CSS;32
7.2.6;Declaring a Page_Data Class;33
7.2.6.1;Classes Make Objects;34
7.2.6.2;Highlighting Current Navigation Item with a Dynamic Style Rule;34
7.2.6.2.1;Taking a Closer Look at the Dynamic CSS;36
7.2.7;Summary;36
7.3;Chapter 3: Form Management;37
7.3.1;What Are Forms?;37
7.3.2;Setting Up a New PHP Project;38
7.3.2.1;Seeing for Yourself;40
7.3.2.2;Creating a Dynamic Navigation;40
7.3.2.3;Creating Page Views for the Form;41
7.3.2.3.1;Displaying Page Views on index.php;41
7.3.2.4;Spending Your Time Wisely: Conventions and Reuse;42
7.3.3;A Super-Simple Search Form;42
7.3.3.1;Trying Your Search Form;42
7.3.3.2;Forms Encode URL Variables;43
7.3.3.2.1;A Name Attribute Declares the Name of a URL Variable;43
7.3.3.2.2;The Element and Some Common Types;44
7.3.3.2.3;Understanding the Method Attribute;44
7.3.4;Named PHP Functions;44
7.3.4.1;The Basic Syntax for Functions;44
7.3.4.2;Using Function Arguments for Increased Flexibility;46
7.3.5;Creating a Form for the Quiz;46
7.3.5.1;Showing the Quiz Form;46
7.3.5.1.1;Using


Jason Lengstorf is a 27-year-old turbogeek from Portland, OR. He started building websites in his late teens when his band couldn t afford to pay someone to do it, and he continued building websites after he realized his band wasn t actually very good. He s been a full-time freelance web developer since 2007, and expanded his business under the name Copter Labs, which is now a distributed freelance collective, keeping about 10 freelancers worldwide busy. He is also the author of PHP for Absolute Beginners and Pro PHP and jQuery.



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.