Muutke küpsiste eelistusi

Learning PHP, MySQL & JavaScript 5e: With jQuery, CSS & HTML5 [Pehme köide]

  • Formaat: Paperback / softback, 800 pages, kõrgus x laius x paksus: 233x181x43 mm, kaal: 1472 g
  • Ilmumisaeg: 30-Jun-2018
  • Kirjastus: O'Reilly Media
  • ISBN-10: 1491978910
  • ISBN-13: 9781491978917
Teised raamatud teemal:
  • Pehme köide
  • Hind: 63,99 €*
  • * saadame teile pakkumise kasutatud raamatule, mille hind võib erineda kodulehel olevast hinnast
  • See raamat on trükist otsas, kuid me saadame teile pakkumise kasutatud raamatule.
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Lisa soovinimekirja
  • Formaat: Paperback / softback, 800 pages, kõrgus x laius x paksus: 233x181x43 mm, kaal: 1472 g
  • Ilmumisaeg: 30-Jun-2018
  • Kirjastus: O'Reilly Media
  • ISBN-10: 1491978910
  • ISBN-13: 9781491978917
Teised raamatud teemal:

Build interactive, data-driven websites with the potent combination of open-source technologies and web standards, even if you only have basic HTML knowledge. With this popular hands-on guide, you’ll tackle dynamic web programming with the help of today’s core technologies: PHP, MySQL, JavaScript, CSS, HTML5, and jQuery libraries of ready-made functions to significantly enhance your projects.

Not only will you get up to speed on the most recent updates to these various technologies—including enhanced MySQL and PHP security features—you’ll also learn how to optimize your websites for use on mobile phones and tablets.

Explore each technology separately, learn how to use them together, and pick up valuable web programming practices along the way. At the end of the book, you’ll put everything together to build a fully functional social networking site suitable for both desktop and mobile browsers, using the AMPPS or any other popular development stack. You’ll learn PHP in depth, along with the basics of object-oriented programming.

  • Explore MySQL, from database structure to complex queries
  • Use the MySQLi Extension, PHP’s improved MySQL interface
  • Create dynamic PHP web pages that tailor themselves to the user
  • Manage cookies and sessions, and maintain a high level of security
  • Master the JavaScript language—and enhance it with the jQuery & jQuery mobile libraries
  • Use Ajax calls for background browser.server communication
  • Acquire CSS2 & CSS3 skills for professionally styling your web pages
  • Implement powerful HTML5 features, including geolocation, audio, video, and the canvas
  • Reformat your websites into mobile web apps
Preface xxiii
1 Introduction to Dynamic Web Content 1(16)
HTTP and HTML: Berners-Lee's Basics
2(1)
The Request/Response Procedure
2(3)
The Benefits of PHP, MySQL, JavaScript, CSS, and HTML5
5(5)
MariaDB: The MySQL Clone
6(1)
Using PHP
6(1)
Using MySQL
7(1)
Using JavaScript
8(2)
Using CSS
10(1)
And Then There's HTML5
10(1)
The Apache Web Server
11(1)
Handling Mobile Devices
12(1)
About Open Source
12(1)
Bringing It All Together
13(1)
Questions
14(3)
2 Setting Up a Development Server 17(18)
What Is a WAMP, MAMP, or LAMP?
18(1)
Installing AMPPS on Windows
18(8)
Testing the Installation
22(2)
Accessing the Document Root (Windows)
24(1)
Alternative WAMPs
25(1)
Installing AMPPS on macOS
26(2)
Accessing the Document Root (macOS)
27(1)
Installing a LAMP on Linux
28(1)
Working Remotely
28(2)
Logging In
29(1)
Using FTP
29(1)
Using a Program Editor
30(1)
Using an IDE
31(2)
Questions
33(2)
3 Introduction to PHP 35(28)
Incorporating PHP Within HTML
35(2)
This Book's Examples
37(1)
The Structure of PHP
38(24)
Using Comments
38(1)
Basic Syntax
39(1)
Variables
40(5)
Operators
45(3)
Variable Assignment
48(2)
Multiple-Line Commands
50(2)
Variable Typing
52(1)
Constants
53(1)
Predefined Constants
54(1)
The Difference Between the echo and print Commands
55(1)
Functions
55(1)
Variable Scope
56(6)
Questions
62(1)
4 Expressions and Control Flow in PHP 63(32)
Expressions
63(3)
True Or False?
64(1)
Literals and Variables
65(1)
Operators
66(8)
Operator Precedence
67(2)
Associativity
69(1)
Relational Operators
70(4)
Conditionals
74(9)
The if Statement
75(1)
The else Statement
76(2)
The elseif Statement
78(1)
The switch Statement
79(3)
The ? Operator
82(1)
Looping
83(7)
while Loops
84(2)
do...while Loops
86(1)
for Loops
86(2)
Breaking Out of a Loop
88(1)
The continue Statement
89(1)
Implicit and Explicit Casting
90(1)
PHP Dynamic Linking
91(1)
Dynamic Linking in Action
92(1)
Questions
93(2)
5 PHP Functions and Objects 95(28)
PHP Functions
96(7)
Defining a Function
97(1)
Returning a Value
98(1)
Returning an Array
99(1)
Passing Arguments by Reference
100(2)
Returning Global Variables
102(1)
Recap of Variable Scope
102(1)
Including and Requiring Files
103(1)
The include Statement
103(1)
Using include_once
103(1)
Using require and require_once
104(1)
PHP Version Compatibility
104(1)
PHP Objects
105(15)
Terminology
106(1)
Declaring a Class
107(1)
Creating an Object
108(1)
Accessing Objects
108(2)
Cloning Objects
110(1)
Constructors
111(1)
Destructors
111(1)
Writing Methods
112(1)
Declaring Properties
113(1)
Declaring Constants
113(1)
Property and Method Scope
114(1)
Static Methods
115(1)
Static Properties
116(1)
Inheritance
117(3)
Questions
120(3)
6 PHP Arrays 123(16)
Basic Access
123(4)
Numerically Indexed Arrays
123(2)
Associative Arrays
125(1)
Assignment Using the array Keyword
126(1)
The foreach...as Loop
127(2)
Multidimensional Arrays
129(3)
Using Array Functions
132(5)
is_array
132(1)
count
132(1)
sort
133(1)
shuffle
133(1)
explode
133(1)
extract
134(1)
compact
135(1)
reset
136(1)
end
136(1)
Questions
137(2)
7 Practical PHP 139(26)
Using printf
139(4)
Precision Setting
140(2)
String Padding
142(1)
Using sprintf
143(1)
Date and Time Functions
143(4)
Date Constants
146(1)
Using checkdate
146(1)
File Handling
147(14)
Checking Whether a File Exists
147(1)
Creating a File
147(2)
Reading from Files
149(1)
Copying Files
150(1)
Moving a File
150(1)
Deleting a File
151(1)
Updating Files
151(2)
Locking Files for Multiple Accesses
153(1)
Reading an Entire File
154(1)
Uploading Files
155(6)
System Calls
161(1)
XHTML or HTML5?
162(1)
Questions
163(2)
8 Introduction to MySQL 165(44)
MySQL Basics
165(1)
Summary of Database Terms
166(1)
Accessing MySQL via the Command Line
166(21)
Starting the Command-Line Interface
167(4)
Using the Command-Line Interface
171(1)
MySQL Commands
172(5)
Data Types
177(10)
Indexes
187(19)
Creating an Index
187(6)
Querying a MySQL Database
193(10)
Joining Tables Together
203(2)
Using Logical Operators
205(1)
MySQL Functions
206(1)
Accessing MySQL via phpMyAdmin
206(1)
Questions
207(2)
9 Mastering MySQI 209(26)
Database Design
209(2)
Primary Keys: The Keys to Relational Databases
210(1)
Normalization
211(8)
First Normal Form
212(2)
Second Normal Form
214(2)
Third Normal Form
216(2)
When Not to Use Normalization
218(1)
Relationships
219(4)
One-to-One
219(1)
One-to-Many
220(1)
Many-to-Many
221(1)
Databases and Anonymity
222(1)
Transactions
223(3)
Transaction Storage Engines
223(1)
Using BEGIN
224(1)
Using COMMIT
225(1)
Using ROLLBACK
225(1)
Using EXPLAIN
226(1)
Backing Up and Restoring
227(5)
Using mysqldump
227(2)
Creating a Backup File
229(2)
Restoring from a Backup File
231(1)
Dumping Data in CSV Format
231(1)
Planning Your Backups
232(1)
Questions
232(3)
10 Accessing MySQI Using PHP 235(32)
Querying a MySQL Database with PHP
235(8)
The Process
235(1)
Creating a Login File
236(1)
Connecting to a MySQL Database
237(6)
A Practical Example
243(7)
The $_POST Array
246(1)
Deleting a Record
247(1)
Displaying the Form
247(1)
Querying the Database
248(1)
Running the Program
249(1)
Practical MySQL
250(8)
Creating a Table
251(1)
Describing a Table
251(1)
Dropping a Table
252(1)
Adding Data
253(1)
Retrieving Data
254(1)
Updating Data
255(1)
Deleting Data
255(1)
Using AUTO_INCREMENT
256(1)
Performing Additional Queries
257(1)
Preventing Hacking Attempts
258(6)
Steps You Can Take
259(1)
Using Placeholders
260(3)
Preventing HTML Injection
263(1)
Using mysqli Procedurally
264(2)
Questions
266(1)
11 Form Handling 267(20)
Building Forms
267(2)
Retrieving Submitted Data
269(11)
Default Values
270(1)
Input Types
271(7)
Sanitizing Input
278(2)
An Example Program
280(3)
HTML5 Enhancements
283(3)
The autocomplete Attribute
283(1)
The autofocus Attribute
283(1)
The placeholder Attribute
283(1)
The required Attribute
284(1)
Override Attributes
284(1)
The width and height Attributes
284(1)
The min and max Attributes
284(1)
The step Attribute
284(1)
The form Attribute
285(1)
The list Attribute
285(1)
The color Input Type
285(1)
The number and range Input Types
285(1)
Date and Time Pickers
286(1)
Questions
286(1)
12 Cookies, Sessions, and Authentication 287(22)
Using Cookies in PHP
287(3)
Setting a Cookie
289(1)
Accessing a Cookie
290(1)
Destroying a Cookie
290(1)
HTTP Authentication
290(9)
Storing Usernames and Passwords
294(2)
An Example Program
296(3)
Using Sessions
299(8)
Starting a Session
299(3)
Ending a Session
302(1)
Setting a Timeout
303(1)
Session Security
304(3)
Questions
307(2)
13 Exploring JavaScript 309(20)
JavaScript and HTML Text
310(4)
Using Scripts Within a Document Head
311(1)
Older and Nonstandard Browsers
311(1)
Including JavaScript Files
312(1)
Debugging JavaScript Errors
313(1)
Using Comments
314(1)
Semicolons
314(1)
Variables
314(2)
String Variables
315(1)
Numeric Variables
315(1)
Arrays
316(1)
Operators
316(3)
Arithmetic Operators
317(1)
Assignment Operators
317(1)
Comparison Operators
318(1)
Logical Operators
318(1)
Incrementing, Decrementing, and Shorthand Assignment
318(1)
String Concatenation
318(1)
Escape Characters
319(1)
Variable Typing
319(2)
Functions
321(1)
Global Variables
321(1)
Local Variables
321(1)
The Document Object Model
322(4)
Another Use for the $ Symbol
324(1)
Using the DOM
325(1)
About document.write
326(1)
Using console.log
326(1)
Using alert
326(1)
Writing into Elements
326(1)
Using document.write
327(1)
Questions
327(2)
14 Expressions and Control Flow in JavaScript 329(20)
Expressions
329(1)
Literals and Variables
330(1)
Operators
331(5)
Operator Precedence
332(1)
Associativity
332(1)
Relational Operators
333(3)
The with Statement
336(1)
Using onerror
337(1)
Using try...catch
338(1)
Conditionals
339(3)
The if Statement
339(1)
The else Statement
339(1)
The switch Statement
340(2)
The ? Operator
342(1)
Looping
342(4)
while Loops
342(1)
do...while Loops
343(1)
for Loops
344(1)
Breaking Out of a Loop
345(1)
The continue Statement
345(1)
Explicit Casting
346(1)
Questions
347(2)
15 JavaScript Functions, Objects, and Arrays 349(22)
JavaScript Functions
349(5)
Defining a Function
349(2)
Returning a Value
351(2)
Returning an Array
353(1)
JavaScript Objects
354(5)
Declaring a Class
354(2)
Creating an Object
356(1)
Accessing Objects
356(1)
The prototype Keyword
356(3)
JavaScript Arrays
359(9)
Numeric Arrays
360(1)
Associative Arrays
361(1)
Multidimensional Arrays
362(1)
Using Array Methods
363(5)
Questions
368(3)
16 JavaScript and PHP Validation and Error Handling 371(24)
Validating User Input with JavaScript
371(6)
The validate.html Document (Part 1)
372(2)
The validate.html Document (Part 2)
374(3)
Regular Expressions
377(10)
Matching Through Metacharacters
378(1)
Fuzzy Character Matching
378(1)
Grouping Through Parentheses
379(1)
Character Classes
380(1)
Indicating a Range
380(1)
Negation
380(1)
Some More Complicated Examples
381(2)
Summary of Metacharacters
383(2)
General Modifiers
385(1)
Using Regular Expressions in JavaScript
385(1)
Using Regular Expressions in PHP
386(1)
Redisplaying a Form After PHP Validation
387(6)
Questions
393(2)
17 Using Asynchronous Communication 395(18)
What Is Asynchronous Communication?
396(1)
Using XMLHttpRequest
396(15)
Your First Asynchronous Program
399(4)
Using GET Instead of POST
403(3)
Sending XML Requests
406(5)
Using Frameworks for Asynchronous Communication
411(1)
Questions
411(2)
18 Introduction to CSS 413(40)
Importing a Stylesheet
414(1)
Importing CSS from Within HTML
414(1)
Embedded Style Settings
415(1)
Using IDs
415(1)
Using Classes
415(1)
Using Semicolons
416(1)
CSS Rules
416(2)
Multiple Assignments
416(1)
Using Comments
417(1)
Style Types
418(2)
Default Styles
418(1)
User Styles
418(1)
External Stylesheets
419(1)
Internal Styles
419(1)
Inline Styles
420(1)
CSS Selectors
420(5)
The Type Selector
420(1)
The Descendant Selector
420(1)
The Child Selector
421(1)
The ID Selector
422(1)
The Class Selector
423(1)
The Attribute Selector
424(1)
The Universal Selector
424(1)
Selecting by Group
425(1)
The CSS Cascade
425(4)
Stylesheet Creators
426(1)
Stylesheet Methods
426(1)
Stylesheet Selectors
427(2)
The Difference Between div and span Elements
429(2)
Measurements
431(2)
Fonts and Typography
433(2)
font-family
433(1)
font-style
434(1)
font-size
434(1)
font-weight
435(1)
Managing Text Styles
435(2)
Decoration
435(1)
Spacing
436(1)
Alignment
436(1)
Transformation
436(1)
Indenting
436(1)
CSS Colors
437(3)
Short Color Strings
438(1)
Gradients
438(2)
Positioning Elements
440(3)
Absolute Positioning
440(1)
Relative Positioning
440(1)
Fixed Positioning
441(2)
Pseudoclasses
443(2)
Shorthand Rules
445(1)
The Box Model and Layout
446(5)
Setting Margins
446(2)
Applying Borders
448(1)
Adjusting Padding
449(2)
Object Contents
451(1)
Questions
451(2)
19 Advanced CSS with CSS3 453(28)
Attribute Selectors
454(1)
Matching Parts of Strings
454(1)
The box-sizing Property
455(1)
CSS3 Backgrounds
456(5)
The background-clip Property
456(2)
The background-origin Property
458(1)
The background-size Property
458(1)
Using the auto Value
459(1)
Multiple Backgrounds
459(2)
CSS3 Borders
461(4)
The border-color Property
461(1)
The border-radius Property
461(4)
Box Shadows
465(1)
Element Overflow
466(1)
Multicolumn Layout
466(2)
Colors and Opacity
468(2)
HSL Colors
468(1)
HSLA Colors
469(1)
RGB Colors
469(1)
RGBA Colors
469(1)
The opacity Property
470(1)
Text Effects
470(2)
The text-shadow Property
470(1)
The text-overflow Property
470(1)
The word-wrap Property
471(1)
Web Fonts
472(2)
Google Web Fonts
473(1)
Transformations
474(2)
3D Transformations
475(1)
Transitions
476(4)
Properties to Transition
477(1)
Transition Duration
477(1)
Transition Delay
477(1)
Transition Timing
477(1)
Shorthand Syntax
478(2)
Questions
480(1)
20 Accessing CSS from JavaScript 481(20)
Revisiting the getElementByld Function
481(3)
The O function
481(1)
The S Function
482(1)
The C Function
483(1)
Including the Functions
484(1)
Accessing CSS Properties from JavaScript
484(4)
Some Common Properties
485(1)
Other Properties
486(2)
Inline JavaScript
488(3)
The this Keyword
488(1)
Attaching Events to Objects in a Script
489(1)
Attaching to Other Events
490(1)
Adding New Elements
491(3)
Removing Elements
492(1)
Alternatives to Adding and Removing Elements
493(1)
Using Interrupts
494(5)
Using setTimeout
494(1)
Canceling a Timeout
495(1)
Using setlnterval
495(2)
Using Interrupts for Animation
497(2)
Questions
499(2)
21 Introduction to jQuery 501(58)
Why jQuery?
501(1)
Including jQuery
502(3)
Choosing the Right Version
502(2)
Downloading
504(1)
Using a Content Delivery Network
504(1)
Customizing jQuery
505(1)
jQuery Syntax
505(2)
A Simple Example
506(1)
Avoiding Library Conflicts
507(1)
Selectors
507(3)
The css Method
508(1)
The Element Selector
508(1)
The ID Selector
509(1)
The Class Selector
509(1)
Combining Selectors
509(1)
Handling Events
510(1)
Waiting Until the Document Is Ready
511(1)
Event Functions and Properties
512(11)
The blur and focus Events
513(1)
The this Keyword
514(1)
The click and dblclick Events
514(1)
The keypress Event
515(2)
Considerate Programming
517(1)
The mousemove Event
517(3)
Other Mouse Events
520(1)
Alternative Mouse Methods
521(1)
The submit Event
522(1)
Special Effects
523(9)
Hiding and Showing
524(1)
The toggle Method
525(1)
Fading In and Out
526(1)
Sliding Elements Up and Down
527(1)
Animations
528(3)
Stopping Animations
531(1)
Manipulating the DOM
532(5)
The Difference Between the text and html Methods
533(1)
The val and attr Methods
533(2)
Adding and Removing Elements
535(2)
Dynamically Applying Classes
537(1)
Modifying Dimensions
537(4)
The width and height Methods
538(2)
The innerWidth and innerHeight Methods
540(1)
The outerWidth and OuterHeight Methods
540(1)
DOM Traversal
541(11)
Parent Elements
541(4)
Child Elements
545(1)
Sibling Elements
545(2)
Selecting the Next and Previous Elements
547(2)
Traversing jQuery Selections
549(1)
The is Method
550(2)
Using jQuery Without Selectors
552(2)
The $.each Method
552(1)
The $.map Method
553(1)
Using Asynchronous Communication
554(1)
Using the POST Method
554(1)
Using the GET Method
555(1)
Plug-ins
555(1)
jQuery User Interface
556(1)
Other Plug-ins
556(1)
Questions
556(3)
22 Introduction to jQuery Mobile 559(20)
Including jQuery Mobile
560(1)
Getting Started
561(2)
Linking Pages
563(5)
Linking Synchronously
563(1)
Linking Within a Multipage Document
564(1)
Page Transitions
565(3)
Styling Buttons
568(3)
List Handling
571(6)
Filterable Lists
572(2)
List Dividers
574(3)
What Next?
577(1)
Questions
577(2)
23 Introduction to HTML5 579(8)
The Canvas
579(2)
Geolocation
581(2)
Audio and Video
583(1)
Forms
584(1)
Local Storage
585(1)
Web Workers
585(1)
Microdata
585(1)
Questions
586(1)
24 The HTML5 Canvas 587(54)
Creating and Accessing a Canvas
587(13)
The toDataURL Function
589(2)
Specifying an Image Type
591(1)
The fillRect Method
591(1)
The clearRect Method
591(1)
The strokeRect Method
592(1)
Combining These Commands
592(1)
The createLinearGradient Method
593(2)
The addColorStop Method in Detail
595(1)
The createRadialGradient Method
596(2)
Using Patterns for Fills
598(2)
Writing Text to the Canvas
600(3)
The strokeText Method
600(1)
The textBaseLine Property
601(1)
The font Property
601(1)
The textAlign Property
601(1)
The fillText Method
602(1)
The measureText Method
603(1)
Drawing Lines
603(3)
The line Width Property
604(1)
The lineCap and linejoin Properties
604(2)
The miterLimit Property
606(1)
Using Paths
606(2)
The moveTo and lineTo Methods
607(1)
The stroke Method
607(1)
The rect Method
608(1)
Filling Areas
608(2)
The clip Method
610(3)
The isPointInPath Method
613(1)
Working with Curves
614(6)
The arc Method
614(3)
The arcTo Method
617(1)
The quadraticCurveTo Method
618(1)
The bezierCurveTo Method
619(1)
Manipulating Images
620(5)
The drawlmage Method
620(1)
Resizing an Image
621(1)
Selecting an Image Area
621(2)
Copying from a Canvas
623(1)
Adding Shadows
623(2)
Editing at the Pixel Level
625(4)
The getImageData Method
625(3)
The putImageData Method
628(1)
The createlmageData Method
628(1)
Advanced Graphical Effects
629(3)
The globalCompositeOperation Property
629(3)
The globalAlpha Property
632(1)
Transformations
632(7)
The scale Method
633(1)
The save and restore Methods
634(1)
The rotate Method
634(1)
The translate Method
635(1)
The transform Method
636(2)
The setTransform Method
638(1)
Questions
639(2)
25 HTML5 Audio and Video 641(14)
About Codecs
642(1)
The <audio> Element
643(3)
Supporting Non-HTML5 Browsers
646(1)
The <video> Element
647(6)
The Video Codecs
648(3)
Supporting Older Browsers
651(2)
Questions
653(2)
26 Other HTML5 Features 655(20)
Geolocation and the GPS Service
655(1)
Other Location Methods
656(1)
Geolocation and HTML5
657(3)
Local Storage
660(3)
Using Local Storage
661(1)
The localStorage Object
661(2)
Web Workers
663(3)
Drag and Drop
666(2)
Cross-Document Messaging
668(4)
Other HTML5 Tags
672(1)
Questions
673(2)
27 Bringing It All Together 675(38)
Designing a Social Networking App
676(1)
On the Website
676(1)
functions.php
676(3)
The Functions
677(2)
header.php
679(3)
setup.php
682(1)
index.php
683(1)
signup.php
684(4)
Checking for Username Availability
685(1)
Logging In
685(3)
checkuser.php
688(1)
login.php
689(2)
profile.php
691(5)
Adding the "About Me" Text
692(1)
Adding a Profile Image
692(1)
Processing the Image
692(1)
Displaying the Current Profile
693(3)
members.php
696(4)
Viewing a User's Profile
696(1)
Adding and Dropping Friends
697(1)
Listing All Members
697(3)
friends.php
700(3)
messages.php
703(3)
logout.php
706(2)
styles.css
708(2)
javascript.js
710(3)
A Solutions to the
Chapter Questions
713(22)
B Online Resources 735(4)
C MySQL's FULLTEXT Stopwords 739(4)
D MySQL Functions 743(10)
E jQuery Selectors, Objects, and Methods 753(24)
Index 777
Robin Nixon has worked with and written about computers since the early 1980s (his first computer was a Tandy TRS 80 Model 1 with a massive 4KB of RAM!). One of the web sites he developed presented the world's first radio station licensed by the music copyright holders. In order to enable people to continue to surf while listening, Robin also developed the first known pop-up windows. He has also worked full time for one of Britain's main IT magazine publishers, where he held several roles including editorial, promotions, and cover disc editing.