Learning PHP, MySQL, JavaScript, and CSS. A Step-by-Step Guide to Creating Dynamic Websites. 2nd Edition - Helion
ISBN: 978-14-493-3748-3
stron: 586, Format: ebook
Data wydania: 2012-08-13
Księgarnia: Helion
Cena książki: 118,15 zł (poprzednio: 137,38 zł)
Oszczędzasz: 14% (-19,23 zł)
Learn how to build interactive, data-driven websites—even if you don’t have any previous programming experience. If you know how to build static sites with HTML, this popular guide will help you tackle dynamic web programming. You’ll get a thorough grounding in today’s core open source technologies: PHP, MySQL, JavaScript, and CSS.
Explore each technology separately, learn how to combine them, and pick up valuable web programming concepts along the way, including objects, XHTML, cookies, and session management. This book provides review questions in each chapter to help you apply what you’ve learned.
- Learn PHP essentials and the basics of object-oriented programming
- Master MySQL, from database structure to complex queries
- Create web pages with PHP and MySQL by integrating forms and other HTML features
- Learn JavaScript fundamentals, from functions and event handling to accessing the Document Object Model
- Pick up CSS basics for formatting and styling your web pages
- Turn your website into a highly dynamic environment with Ajax calls
- Upload and manipulate files and images, validate user input, and secure your applications
- Explore a working example that brings all of the ingredients together
Osoby które kupowały "Learning PHP, MySQL, JavaScript, and CSS. A Step-by-Step Guide to Creating Dynamic Websites. 2nd Edition", wybierały także:
- Zosta 149,00 zł, (44,70 zł -70%)
- LESS. Kurs video. Poziom pierwszy. Jak usprawnić pracę z CSS 89,00 zł, (35,60 zł -60%)
- CSS i SASS. Kurs video. Praktyczny projekt nowoczesnego dashboardu 99,00 zł, (44,55 zł -55%)
- CSS3. Kurs video. Poziom pierwszy. Nowoczesne i stylowe strony WWW 59,00 zł, (26,55 zł -55%)
- Sass od podstaw. Kurs video. Budowa kompleksowej strony w oparciu o metodologię BEM 47,93 zł, (22,05 zł -54%)
Spis treści
Learning PHP, MySQL, JavaScript, and CSS. A Step-by-Step Guide to Creating Dynamic Websites. 2nd Edition eBook -- spis treści
- Learning PHP, MySQL, JavaScript, and CSS, 2E
- Dedication
- Preface
- Audience
- Assumptions This Book Makes
- Organization of This Book
- Supporting Books
- Conventions Used in This Book
- Using Code Examples
- Safari Books Online
- How to Contact Us
- Acknowledgments
- Content Updates
- April 12, 2013
- 1. Introduction to Dynamic Web Content
- HTTP and HTML: Berners-Lees Basics
- The Request/Response Procedure
- The Benefits of PHP, MySQL, JavaScript, and CSS
- Using PHP
- Using MySQL
- Using JavaScript
- Using CSS
- The Apache Web Server
- About Open Source
- Bringing It All Together
- Test Your Knowledge
- HTTP and HTML: Berners-Lees Basics
- 2. Setting Up a Development Server
- What Is a WAMP, MAMP, or LAMP?
- Installing a WAMP on Windows
- Testing the Installation
- Alternative WAMPs
- Installing a MAMP on Mac OS X
- Configuring MySQL
- Ensuring MySQL starts on booting
- Testing the Installation
- Configuring MySQL
- Installing a LAMP on Linux
- Working Remotely
- Logging In
- Using FTP
- Using a Program Editor
- Using an IDE
- Questions
- 3. Introduction to PHP
- Incorporating PHP Within HTML
- Calling the PHP Parser
- This Books Examples
- The Structure of PHP
- Using Comments
- Basic Syntax
- Semicolons
- The $ symbol
- Understanding Variables
- String variables
- Numeric variables
- Arrays
- Two-dimensional arrays
- Variable naming rules
- Operators
- Arithmetic operators
- Assignment operators
- Comparison operators
- Logical operators
- Variable Assignment
- Variable incrementing and decrementing
- String concatenation
- String types
- Escaping characters
- Multiple-Line Commands
- Variable Typing
- Constants
- Predefined constants
- The Difference Between the echo and print Commands
- Functions
- Variable Scope
- Local variables
- Global variables
- Static variables
- Superglobal variables
- Superglobals and security
- Test Your Knowledge
- Incorporating PHP Within HTML
- 4. Expressions and Control Flow in PHP
- Expressions
- Literals and Variables
- Operators
- Operator Precedence
- Associativity
- Relational Operators
- Equality operators
- Comparison operators
- Logical operators
- Conditionals
- The if Statement
- The else Statement
- The elseif Statement
- The switch Statement
- Breaking out
- Default action
- Alternative syntax
- The ? Operator
- Looping
- while Loops
- dowhile Loops
- for Loops
- Breaking Out of a Loop
- The continue Statement
- Implicit and Explicit Casting
- PHP Dynamic Linking
- Dynamic Linking in Action
- Test Your Knowledge
- Expressions
- 5. PHP Functions and Objects
- PHP Functions
- Defining a Function
- Returning a Value
- Returning an Array
- Passing by Reference
- Returning Global Variables
- Recap of Variable Scope
- Including and Requiring Files
- The include Statement
- Using include_once
- Using require and require_once
- PHP Version Compatibility
- PHP Objects
- Terminology
- Declaring a Class
- Creating an Object
- Accessing Objects
- Cloning objects
- Constructors
- PHP 5 destructors
- Writing Methods
- Static methods in PHP 5
- Declaring Properties
- Declaring Constants
- Property and Method Scope in PHP 5
- Static properties and methods
- Inheritance
- The parent operator
- Subclass constructors
- Final methods
- Test Your Knowledge
- PHP Functions
- 6. PHP Arrays
- Basic Access
- Numerically Indexed Arrays
- Associative Arrays
- Assignment Using the array Keyword
- The foreach...as Loop
- Multidimensional Arrays
- Using Array Functions
- is_array
- count
- sort
- shuffle
- explode
- extract
- compact
- reset
- end
- Test Your Knowledge
- Basic Access
- 7. Practical PHP
- Using printf
- Precision Setting
- String Padding
- Using sprintf
- Date and Time Functions
- Date Constants
- Using checkdate
- File Handling
- Checking Whether a File Exists
- Creating a File
- Reading from Files
- Copying Files
- Moving a File
- Deleting a File
- Updating Files
- Locking Files for Multiple Accesses
- Reading an Entire File
- Uploading Files
- Using $_FILES
- Validation
- System Calls
- XHTML
- The Benefits of XHTML
- XHTML Versions
- Whats Different?
- HTML 4.01 Document Types
- The HTML5 Document Type
- XHTML 1.0 Document Types
- XHTML Validation
- Test Your Knowledge
- Using printf
- 8. Introduction to MySQL
- MySQL Basics
- Summary of Database Terms
- Accessing MySQL via the Command Line
- Starting the Command-Line Interface
- Windows users
- OS X users
- Linux users
- MySQL on a remote server
- Using the Command-Line Interface
- The semicolon
- Canceling a command
- MySQL Commands
- Creating a database
- Creating users
- Creating a table
- Data Types
- The CHAR data type
- The BINARY data type
- The TEXT and VARCHAR data types
- The BLOB data type
- Numeric data types
- DATE and TIME
- The AUTO_INCREMENT data type
- Adding data to a table
- Renaming a table
- Changing the data type of a column
- Adding a new column
- Renaming a column
- Removing a column
- Deleting a table
- Starting the Command-Line Interface
- Indexes
- Creating an Index
- Using CREATE INDEX
- Adding indexes when creating tables
- Primary keys
- Creating a FULLTEXT index
- Querying a MySQL Database
- SELECT
- SELECT COUNT
- SELECT DISTINCT
- DELETE
- WHERE
- LIMIT
- MATCH...AGAINST
- MATCHAGAINSTIN BOOLEAN MODE
- UPDATESET
- ORDER BY
- GROUP BY
- Joining Tables Together
- NATURAL JOIN
- JOIN...ON
- Using AS
- Using Logical Operators
- Creating an Index
- MySQL Functions
- Accessing MySQL via phpMyAdmin
- Windows Users
- OS X Users
- Linux Users
- Using phpMyAdmin
- Test Your Knowledge
- 9. Mastering MySQL
- Database Design
- Primary Keys: The Keys to Relational Databases
- Normalization
- First Normal Form
- Second Normal Form
- Third Normal Form
- When Not to Use Normalization
- Relationships
- One-to-One
- One-to-Many
- Many-to-Many
- Databases and Anonymity
- Transactions
- Transaction Storage Engines
- Using BEGIN
- Using COMMIT
- Using ROLLBACK
- Using EXPLAIN
- Backing Up and Restoring
- Using mysqldump
- Creating a Backup File
- Backing up a single table
- Backing up all tables
- Restoring from a Backup File
- Dumping Data in CSV Format
- Planning Your Backups
- Test Your Knowledge
- Database Design
- 10. Accessing MySQL Using PHP
- Querying a MySQL Database with PHP
- The Process
- Creating a Login File
- Connecting to MySQL
- Selecting a database
- Building and executing a query
- Fetching a result
- Fetching a row
- Closing a connection
- A Practical Example
- The $_POST Array
- Deleting a Record
- Displaying the Form
- Querying the Database
- Running the Program
- Practical MySQL
- Creating a Table
- Describing a Table
- Dropping a Table
- Adding Data
- Retrieving Data
- Updating Data
- Deleting Data
- Using AUTO_INCREMENT
- Using insert IDs
- Using locks
- Performing Additional Queries
- Preventing SQL Injection
- Using placeholders
- Preventing HTML Injection
- Test Your Knowledge
- Querying a MySQL Database with PHP
- 11. Form Handling
- Building Forms
- Retrieving Submitted Data
- register_globals: An Old Solution Hangs On
- Default Values
- Input Types
- Text boxes
- Text areas
- Checkboxes
- Radio buttons
- Hidden fields
- Select
- Labels
- The submit button
- Sanitizing Input
- An Example Program
- Test Your Knowledge
- 12. Cookies, Sessions, and Authentication
- Using Cookies in PHP
- Setting a Cookie
- Accessing a Cookie
- Destroying a Cookie
- HTTP Authentication
- Storing Usernames and Passwords
- Salting
- Using Sessions
- Starting a Session
- Ending a Session
- Setting a timeout
- Session Security
- Preventing session hijacking
- Preventing session fixation
- Forcing cookie-only sessions
- Using a shared server
- Test Your Knowledge
- Using Cookies in PHP
- 13. Exploring JavaScript
- JavaScript and HTML Text
- Using Scripts Within a Document Head
- Older and Nonstandard Browsers
- Including JavaScript Files
- Debugging JavaScript Errors
- Using Comments
- Semicolons
- Variables
- String Variables
- Numeric Variables
- Arrays
- Operators
- Arithmetic Operators
- Assignment Operators
- Comparison Operators
- Logical Operators
- Variable Incrementing and Decrementing
- String Concatenation
- Escaping Characters
- Variable Typing
- Functions
- Global Variables
- Local Variables
- The Document Object Model (DOM)
- But Its Not That Simple
- Another use for the $
- Using the DOM
- But Its Not That Simple
- Test Your Knowledge
- JavaScript and HTML Text
- 14. Expressions and Control Flow in JavaScript
- Expressions
- Literals and Variables
- Operators
- Operator Precedence
- Associativity
- Relational Operators
- Equality operators
- Comparison operators
- Logical operators
- The with Statement
- Using onerror
- Using try...catch
- Conditionals
- The if Statement
- The else statement
- The switch statement
- Breaking out
- Default action
- The ? Operator
- The if Statement
- Looping
- while Loops
- dowhile Loops
- for Loops
- Breaking Out of a Loop
- The continue Statement
- Explicit Casting
- Test Your Knowledge
- Expressions
- 15. JavaScript Functions, Objects, and Arrays
- JavaScript Functions
- Defining a Function
- The arguments array
- Returning a Value
- Returning an Array
- Defining a Function
- JavaScript Objects
- Declaring a Class
- Creating an Object
- Accessing Objects
- The prototype Keyword
- Static methods and properties
- Extending JavaScript objects
- JavaScript Arrays
- Numeric Arrays
- Assigning element values
- Assignment using the Array keyword
- Associative Arrays
- Multidimensional Arrays
- Using Array Methods
- concat
- forEach (for non-IE browsers)
- forEach (a cross-browser solution)
- join
- push and pop
- Using reverse
- sort
- Numeric Arrays
- Test Your Knowledge
- JavaScript Functions
- 16. JavaScript and PHP Validation and Error Handling
- Validating User Input with JavaScript
- The validate.html Document (Part One)
- How it works
- The validate.html Document (Part Two)
- Validating the forename
- Validating the surname
- Validating the username
- Validating the password
- Validating the age
- Validating the email address
- Using a separate JavaScript file
- The validate.html Document (Part One)
- Regular Expressions
- Matching Through Metacharacters
- Fuzzy Character Matching
- Grouping Through Parentheses
- Character Classes
- Indicating a range
- Negation
- Some More Complicated Examples
- Summary of Metacharacters
- General Modifiers
- Using Regular Expressions in JavaScript
- Using Regular Expressions in PHP
- Redisplaying a Form After PHP Validation
- Test Your Knowledge
- Validating User Input with JavaScript
- 17. Using Ajax
- What Is Ajax?
- Using XMLHttpRequest
- Implementing Ajax via POST Requests
- The readyState Property
- The Server Half of the Ajax Process
- Using GET Instead of POST
- Sending XML Requests
- About XML
- Why Use XML?
- Using Frameworks for Ajax
- Test Your Knowledge
- 18. Introduction to CSS
- Importing a Style Sheet
- Importing a Style Sheet from Within HTML
- Embedded Style Settings
- Using IDs
- Using Classes
- CSS Rules
- Using Semicolons
- Multiple Assignments
- Using Comments
- Style Types
- Default Styles
- User Styles
- External Style Sheets
- Internal Styles
- Inline Styles
- CSS Selectors
- The Type Selector
- The Descendant Selector
- The Child Selector
- The Adjacent Sibling Selector
- The ID Selector
- Reusing IDs
- The Class Selector
- Narrowing class scope
- The Attribute Selector
- The Universal Selector
- Selecting by Group
- The CSS Cascade
- Style Sheet Creators
- Style Sheet Methods
- Style Sheet Selectors
- Calculating specificity
- Using a different number base
- Some rules are more equal than others
- The Difference Between <div> and <span>
- Measurements
- Fonts and Typography
- font-family
- font-style
- font-size
- font-weight
- Managing Text Styles
- Decoration
- Spacing
- Alignment
- Transformation
- Indenting
- CSS Colors
- Short Color Strings
- Gradients
- Positioning Elements
- Absolute Positioning
- Relative Positioning
- Fixed Positioning
- Comparing Positioning Types
- Pseudoclasses
- Pseudoelements
- Shorthand Rules
- The Box Model and Layout
- Setting Margins
- Applying Borders
- Adjusting Padding
- Object Contents
- Test Your Knowledge
- Importing a Style Sheet
- 19. Advanced CSS with CSS3
- Attribute Selectors
- Matching Parts of Strings
- The ^ operator
- The $ operator
- The * operator
- Matching Parts of Strings
- The box-sizing Property
- CSS3 Backgrounds
- The background-clip Property
- The background-origin Property
- The background-size Property
- Using the auto value
- Multiple Backgrounds
- CSS3 Borders
- The border-color Property
- The border-radius Property
- Box Shadows
- Element Overflow
- Multicolumn Layout
- Colors and Opacity
- HSL Colors
- HSLA Colors
- RGB Colors
- RGBA Colors
- The opacity Property
- Text Effects
- The text-shadow Property
- The text-overflow Property
- The word-wrap Property
- Web Fonts
- Google Web Fonts
- Transformations
- Transitions
- Properties to Transition
- Transition Duration
- Transition Delay
- Transition Timing
- Shorthand Syntax
- Test Your Knowledge
- Attribute Selectors
- 20. Accessing CSS from JavaScript
- Revisiting the getElementById Function
- The O Function
- The S Function
- The C Function
- Using the C function
- Including the Functions
- Accessing CSS Properties from JavaScript
- Some Common Properties
- Other Properties
- Inline JavaScript
- The this Keyword
- Attaching Events to Objects in a Script
- Attaching to Other Events
- Adding New Elements
- Removing Elements
- Alternatives to Adding and Removing Elements
- Using Interrupts
- Using setTimeout
- Passing a string
- Repeating timeouts
- Canceling a Timeout
- Using setInterval
- Using the function
- Canceling an interval
- Using Interrupts for Animation
- Using setTimeout
- Test Your Knowledge
- Revisiting the getElementById Function
- 21. Bringing It All Together
- Designing a Social Networking Site
- On the Website
- functions.php
- The Functions
- header.php
- setup.php
- index.php
- signup.php
- Checking for Username Availability
- checkuser.php
- login.php
- profile.php
- Adding the About Me Text
- Adding a Profile Image
- Processing the Image
- Displaying the Current Profile
- members.php
- Viewing a Users Profile
- Adding and Dropping Friends
- Listing All Members
- friends.php
- messages.php
- logout.php
- styles.css
- A. Solutions to the Chapter Questions
- Chapter 1 Answers
- Chapter 2 Answers
- Chapter 3 Answers
- Chapter 4 Answers
- Chapter 5 Answers
- Chapter 6 Answers
- Chapter 7 Answers
- Chapter 8 Answers
- Chapter 9 Answers
- Chapter 10 Answers
- Chapter 11 Answers
- Chapter 12 Answers
- Chapter 13 Answers
- Chapter 14 Answers
- Chapter 15 Answers
- Chapter 16 Answers
- Chapter 17 Answers
- Chapter 18 Answers
- Chapter 19 Answers
- Chapter 20 Answers
- B. Online Resources
- PHP Resource Sites
- MySQL Resource Sites
- JavaScript Resource Sites
- Ajax Resource Sites
- Miscellaneous Resource Sites
- OReilly Resource Sites
- C. MySQLs FULLTEXT Stopwords
- D. MySQL Functions
- String Functions
- CONCAT()
- CONCAT_WS()
- LEFT()
- RIGHT()
- MID()
- LENGTH()
- LPAD()
- RPAD
- LOCATE()
- LOWER()
- UPPER()
- QUOTE()
- REPEAT()
- REPLACE()
- TRIM()
- LTRIM() and RTRIM()
- Date Functions
- CURDATE()
- DATE()
- DATE_ADD()
- DATE_FORMAT()
- DAY()
- DAYNAME()
- DAYOFWEEK()
- DAYOFYEAR()
- LAST_DAY()
- MAKEDATE()
- MONTH()
- MONTHNAME()
- SYSDATE()
- YEAR()
- WEEK()
- WEEKDAY()
- Time Functions
- CURTIME()
- HOUR()
- MINUTE()
- SECOND()
- MAKETIME()
- TIMEDIFF()
- UNIX_TIMESTAMP()
- FROM_UNIXTIME()
- String Functions
- Index
- About the Author
- Colophon
- Copyright