Muutke küpsiste eelistusi

E-raamat: Web Programming with PHP and MySQL: A Practical Guide

  • Formaat: PDF+DRM
  • Sari: Computer Science
  • Ilmumisaeg: 03-Nov-2015
  • Kirjastus: Springer International Publishing AG
  • Keel: eng
  • ISBN-13: 9783319226590
  • Formaat - PDF+DRM
  • Hind: 50,62 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: PDF+DRM
  • Sari: Computer Science
  • Ilmumisaeg: 03-Nov-2015
  • Kirjastus: Springer International Publishing AG
  • Keel: eng
  • ISBN-13: 9783319226590

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Introductory textbook covering all the main features of the 'web programming' languages PHP and MySQL together with detailed examples that will enable readers (whether students on a taught course or independent learners) to use them to create their own applications or understand existing ones. A particular focus is the use of PHP to generate MySQL commands from a script as it is executed.  Each chapter includes aims, a summary and practical exercises (with solutions) to support learning. Chapters are designed to stand alone as far as possible, so that they can be studied independently of the rest of the text by those with some previous knowledge of the languages. There is a comprehensive glossary of technical terms, together with extensive appendices for quick reference of language features.

Arvustused

Web programming with PHP and MySQL fulfills the promise of its subtitle: a practical guide. The writing is friendly and clear, with the author indicating when every alternative to a command is not given and making suggestions on when it is necessary to consult with an Internet service provider (ISP). the book is a useful reference and serves as an introduction to using PHP and MySQL for building applications for the web. (Jeanine Meyer, Computing Reviews, computingreviews.com, June, 2016)

1 Introduction
1(10)
1.1 How a Web Browser Processes an HTML File
4(1)
1.2 Notation
5(1)
1.3 Creating an HTML File
5(1)
1.4 How PHP Files Are Processed
5(2)
1.5 Exercise: The Erewhon Society's Home Page
7(2)
1.6 About This Book
9(2)
2 PHP Fundamentals
11(16)
2.1 Structure of a PHP Script
11(3)
2.1.1 Blank Lines and Layout
12(1)
2.1.2 Comments
12(2)
2.2 How a `Mixed' PHP File Is Processed
14(1)
2.3 PHP: Basic Components
14(1)
2.4 Variables
15(4)
2.4.1 Uninitialized Variables
16(1)
2.4.2 Variable Names: A Warning
16(1)
2.4.3 Types of Variable
17(1)
2.4.4 Arrays
17(2)
2.4.5 Variable Variables
19(1)
2.5 Constants
19(3)
2.5.1 Numbers
19(1)
2.5.2 Strings
20(2)
2.5.3 Logical Constants
22(1)
2.6 Functions
22(2)
2.7 A Note on Brackets
24(1)
2.8 Some Combinations of Quote Characters
24(3)
Practical Exercise 2
25(2)
3 The PHP Language: Types of Statement
27(26)
3.1 Overview of Statements
27(1)
3.1.1 PHP Key words
28(1)
3.2 Assignment Statements
28(7)
3.2.1 Arithmetic Expressions
28(2)
3.2.2 Evaluating an Arithmetic Expression
30(1)
3.2.3 Arithmetic Functions
31(1)
3.2.4 Simplified Notation for Assignment
31(1)
3.2.5 String Expressions
32(1)
3.2.6 String Functions
32(1)
3.2.7 Simplified Notation for Joining Strings
32(1)
3.2.8 Logical Expressions
33(1)
3.2.9 Evaluating Logical Expressions
34(1)
3.2.10 Logical Function
34(1)
3.3 PRINT Statements
35(4)
3.3.1 Printing Logical Values
39(1)
3.4 IF Statements
39(4)
3.4.1 Statement Groups
40(1)
3.4.2 Augmenting an `if' Statement with `else if' and `else' Clauses
41(1)
3.4.3 Dealing with Variable Values in Conditional Expressions
42(1)
3.5 The Switch Statement
43(1)
3.6 Loops in PHP 1: For Loops
44(1)
3.7 Loops in PHP 2: WHILE Loops
45(2)
3.8 Loops in PHP 3: Do While Loops
47(1)
3.9 The Include and Require Statements
48(5)
Practical Exercise 3
51(2)
4 More About Arrays
53(14)
4.1 The Array Function
53(1)
4.2 The Count Function
54(1)
4.3 The PHP Foreach Statement
55(2)
4.4 Sort Functions
57(2)
4.5 Associative Arrays
59(3)
4.5.1 Using Associative Arrays with Dates
62(1)
4.6 Two Dimensional Arrays
62(2)
4.7 The Explode and Implode Functions
64(3)
Practical Exercise 4
65(2)
5 Some Important Functions
67(16)
5.1 System Functions Applied to Numbers
67(1)
5.1.1 Mathematical Constant
68(1)
5.2 Trigonometric Functions
68(1)
5.3 System Functions Applied to Strings
69(6)
5.3.1 Trimming a String
69(1)
5.3.2 Changing Case
70(1)
5.3.3 Converting Initial Letters to Uppercase
71(1)
5.3.4 Replacing One Substring by Another
71(1)
5.3.5 Reversing a String
72(1)
5.3.6 Manipulating a Substring
72(1)
5.3.7 Converting a String to an Array and Vice Versa
73(1)
5.3.8 Wrapping Text
74(1)
5.4 The rand Function
75(1)
5.5 The max and min Functions
76(1)
5.6 The date Function
77(2)
5.6.1 List of Special One-character Arguments for the date Function
78(1)
5.7 The header Function
79(1)
5.8 The die Function
80(1)
5.9 The echo Function
80(1)
5.10 The phpinfo Function
81(2)
Practical Exercise 5
81(2)
6 Formatted Print Functions
83(10)
6.1 Standalone Functions
83(1)
6.2 The printf Function
84(7)
6.2.1 Type Specifiers
85(1)
6.2.2 The Sign Specifier
86(1)
6.2.3 Precision Specifiers
86(1)
6.2.4 Padding Specifiers
87(2)
6.2.5 Padding Strings
89(1)
6.2.6 Outputting a Percent Sign
89(1)
6.2.7 Specifying Variables Explicitly
89(1)
6.2.8 Combining Options
90(1)
6.2.9 List of Type Specifiers
90(1)
6.3 The sprintf Function
91(2)
Practical Exercise 6
92(1)
7 Using Files
93(20)
7.1 Directories and Sub-directories
93(2)
7.2 Relative Addressing Using Paths
95(1)
7.2.1 Relative and Absolute Addresses
96(1)
7.3 Storing Data in Text Files
96(7)
7.3.1 Opening a File
97(1)
7.3.2 Closing a File
98(1)
7.3.3 Writing to an Open File
98(1)
7.3.4 Formatted Writing to an Open File
99(1)
7.3.5 Reading an Open File
100(1)
7.3.6 The File Function
100(1)
7.3.7 Examples
101(1)
7.3.8 Using the Explode and Implode Functions
102(1)
7.4 File and Directory Protections
103(1)
7.5 Checking Existence and Protection Status of Files and Directories
104(1)
7.6 Other Functions Applied to Files or Directories
104(2)
7.6.1 Changing File or Directory Protections
105(1)
7.6.2 Creating and Deleting Directories
105(1)
7.6.3 Renaming Files and Directories
105(1)
7.6.4 Getting and Changing the Current Directory
106(1)
7.7 Decomposing a Relative File or Directory Name into its Components
106(2)
7.7.1 Example
108(1)
7.8 Finding the Contents of a Directory
108(1)
7.9 Summary of Functions
109(4)
Practical Exercise 7
111(2)
8 User-Defined Functions
113(14)
8.1 Introduction
113(4)
8.2 Global and Local Variables
117(1)
8.3 Returning More than One Value
118(1)
8.4 Creating a Function Library
119(2)
8.5 Using a GLOBAL Statement in a Function Definition
121(1)
8.6 Passing an Array as a Function Argument
121(1)
8.7 Arguments Passed by Value and Arguments Passed by Reference
122(2)
8.8 Default Values for Arguments
124(3)
Practical Exercise 8
125(2)
9 Passing Variables to a PHP Script I
127(26)
9.1 Introduction
127(1)
9.2 Webforms
128(3)
9.2.1 The <form>Tag
130(1)
9.3 Form Objects
131(11)
9.3.1 Text Field
131(1)
9.3.2 Textarea Field
132(1)
9.3.3 Radio Buttons in a Radio Group
133(2)
9.3.4 Select Box
135(5)
9.3.5 Checkbox
140(1)
9.3.6 Submit and Reset Buttons
141(1)
9.4 Other Form Objects
142(6)
9.4.1 Password Field
143(1)
9.4.2 Hidden Field
144(1)
9.4.3 File Field
145(1)
9.4.4 Readonly and Disabled Fields
146(2)
9.5 Using Popup Windows
148(5)
Practical Exercise 9
151(2)
10 Passing Variables to a PHP Script II
153(22)
10.1 Introduction
153(1)
10.2 Destination Pages
153(13)
10.2.1 Checking for Compulsory Values
159(1)
10.2.2 Checking for Numeric Values and Integers
159(1)
10.2.3 Multiple Selections
160(2)
10.2.4 File Fields
162(2)
10.2.5 Quotes in Text Fields and Textareas
164(2)
10.3 Passing Variables to a PHP Script as Part of a URL
166(3)
10.4 Passing Values to PHP Scripts Using Session Variables
169(6)
Practical Exercise 10
173(2)
11 PHP in Action: Managing a Members' Area
175(22)
11.1 Entering Passwords
176(3)
11.2 Turning PHP On and Off
179(1)
11.3 A Note on Security
180(1)
11.4 Writing a Log File
181(2)
11.5 Storing Data in Text Files
183(1)
11.6 Multiple Passwords
184(2)
11.7 Reading a Log File
186(11)
11.7.1 Generating the Access Table
187(3)
11.7.2 Displaying the Results in Tabular Form
190(3)
11.7.3 Adding HTML Tags Using Include
193(2)
Practical Exercise 11
195(2)
12 Using a MySQL Database I
197(20)
12.1 MySQL Databases
197(2)
12.2 Creating a Database
199(1)
12.2.1 Specifying the Current Database
199(1)
12.3 Creating a Table
199(1)
12.4 Issuing MySQL Commands
200(1)
12.5 Naming Databases, Tables and Fields
201(1)
12.5.1 Case Sensitivity of Database, Table and Field Names
201(1)
12.6 Setting a Primary Key
202(1)
12.7 Adding a Record to the mytablel Table
202(4)
12.7.1 The INSERT INTO Command
204(2)
12.7.2 The REPLACE INTO Command
206(1)
12.8 Deleting a Record
206(1)
12.9 Changing a Table
207(2)
12.10 Updating a Table
209(5)
12.11 Summary of MySQL Commands
214(3)
Practical Exercise 12
215(2)
13 Using a MySQL Database II
217(26)
13.1 The Select Command
218(10)
13.1.1 Order by Clauses
219(3)
13.1.2 Where Clauses
222(2)
13.1.3 Displaying Values that are not Fields
224(1)
13.1.4 Limit Clauses
224(2)
13.1.5 Applying Functions to the Values of a Field
226(1)
13.1.6 Finding the Number of Records in a Table
227(1)
13.1.7 Finding All the Distinct Values of a Field
227(1)
13.2 Complex Select/Update Commands
228(1)
13.3 Combining Tables: Inner and Outer Joins
228(4)
13.4 Auto_Increment Fields
232(2)
13.5 The Show Command
234(2)
13.5.1 Show Databases
234(1)
13.5.2 Show Tables
235(1)
13.5.3 Show Fields / Show Columns / Describe
235(1)
13.5.4 Show Variables
236(1)
13.6 Some Further Commands and Adding Comments
236(1)
13.6.1 Renaming a Table
237(1)
13.6.2 Deleting a Table
237(1)
13.6.3 Deleting a Database
237(1)
13.6.4 Including a Comment in a MySQL Command
237(1)
13.7 Summary of MySQL Commands
237(6)
Practical Exercise 13
241(2)
14 Creating and Updating MySQL Tables
243(12)
14.1 Creating a Table
243(1)
14.2 Data Types
244(3)
14.2.1 Integer Types
244(1)
14.2.2 Fixed Point Types
245(1)
14.2.3 Floating Point Types
246(1)
14.2.4 Character Types
246(1)
14.2.5 Enumeration Types
247(1)
14.2.6 Date and Time Types
247(1)
14.3 Not Null And Default Clauses
247(2)
14.3.1 Implied Default Values
248(1)
14.4 AUTO_INCREMENT Clause
249(1)
14.5 Key Clauses
249(1)
14.6 Copying a Table
249(1)
14.7 Changing the Structure, the Name and the Field Specifications of a Table
250(2)
14.7.1 Primary Keys
250(1)
14.7.2 Set the Starting Value for an AUTO_INCREMENT Field
250(1)
14.7.3 Change the Name of a Table
250(1)
14.7.4 Add a New Field
250(1)
14.7.5 Change the Name and/or Structure of a Field
251(1)
14.7.6 Changing a Default Value
251(1)
14.8 Using the SHOW Command to Find the Structure of a Table
252(1)
14.9 Summary of MySQL Commands
252(3)
Practical Exercise 14
253(2)
15 Using a PHP Script to Manage a MySQL Database
255(28)
15.1 Connecting to a Database
256(10)
15.2 A PHP Function to Display the Result of a Selection
266(3)
15.2.1 Finding the Version of MySQL
268(1)
15.3 Using Simpler MySQL Commands
269(1)
15.4 Combining Tables
270(4)
15.5 A Visual MySQL Command Processing Tool
274(5)
15.6 The PHP mysql_affected_rows Function
279(1)
15.7 The PHP mysql_insert_id Function
280(1)
15.8 Converting mysql_Functions to mysqli_Functions
280(3)
Practical Exercise 15
282(1)
16 PHP in Action: Converting Data between Text Files and Database Tables
283(18)
16.1 A Plays Dataset
284(1)
16.2 Data Cleaning for the Plays Dataset
284(8)
16.3 Extracting Information from a Table: Finding the Next Production
292(3)
16.4 Backing up and Restoring a Table
295(3)
16.4.1 Restoring a Table
297(1)
16.5 Using the explode Function When There Are Multiple Occurrences of the Separator
298(3)
Practical Exercise 16
299(2)
17 Using PHP to View and Edit Database Tables
301(20)
17.1 Analyzing the Current Database
301(6)
17.2 Building a Visual Table Editor
307(14)
17.2.1 Developing an Editing Page
307(1)
17.2.2 Developing the Destination Page
308(8)
17.2.3 Changing and Adding to a Table
316(4)
Practical Exercise 17
320(1)
18 PHP in Action: Maintaining a Membership List
321(24)
18.1 Registration
321(7)
18.2 Logging in
328(6)
18.3 Sending Email from a PHP Script
334(2)
18.4 Generating Passwords
336(3)
18.5 Managing the Members Table
339(6)
Practical Exercise 18
344(1)
19 Appendices
345(40)
19.1 PHP System Functions
345(11)
19.1.1 Abbreviations Used in Specifications of Function Arguments
345(1)
19.1.2 Terms Used in Specifications of Function Arguments
345(1)
19.1.3 System Functions Applied to Numbers
346(1)
19.1.4 Trigonometrie Functions
347(1)
19.1.5 System Functions Applied to Arrays
348(1)
19.1.6 System Functions Applied to Strings
348(1)
19.1.7 System Functions Applied to Variables
349(1)
19.1.8 System Functions for Use with Arrays
349(2)
19.1.9 Formatted Print Functions
351(1)
19.1.10 System Functions for Use with Text Files
351(2)
19.1.11 Logical Functions
353(1)
19.1.12 Functions Used with Sessions (see Chap. 10 for more details)
353(1)
19.1.13 Functions Used with Uploaded Files (see Chap. 10 for more details)
353(1)
19.1.14 Other System Functions
354(1)
19.1.15 System Functions Used for Manipulating a MySQL Database
354(2)
19.1.16 `Improved' System Functions Used for Manipulating a MySQL Database (See Sect. 15.8)
356(1)
19.2 PHP System Operators
356(2)
19.2.1 Binary Arithmetic Operators Applied to Numerical Expressions
356(1)
19.2.2 Unary Arithmetic Operators Applied to Numbers
357(1)
19.2.3 System Operators Applied to Strings
357(1)
19.2.4 Relational Operators
357(1)
19.2.5 Logical Operators
357(1)
19.2.6 Operators Giving a Simplified Notation for Assignment
358(1)
19.2.7 Operators Giving a Simplified Notation for Joining Strings
358(1)
19.3 Summary of MySQL Commands
358(4)
19.4 MySQL Operators and Functions
362(2)
19.4.1 Simple Conditions in WHERE Clauses
362(1)
19.4.2 Complex Conditions in WHERE Clauses
363(1)
19.4.3 Other Functions in SELECT Commands
363(1)
19.4.4 UPDATE Commands
363(1)
19.5 Summary of Case-Sensitivity Rules: PHP and MySQL
364(1)
19.5.1 PHP
364(1)
19.5.2 MySQL
364(1)
19.5.3 Other
364(1)
19.6 Principal HTML Tags
365(1)
19.7 Specimen Solutions to Practical Exercises
366(13)
19.7.1 Practical Exercise 2
366(1)
19.7.2 Practical Exercise 3
366(1)
19.7.3 Practical Exercise 4
367(2)
19.7.4 Practical Exercise 5
369(1)
19.7.5 Practical Exercise 6
370(1)
19.7.6 Practical Exercise 7
370(1)
19.7.7 Practical Exercise 8
371(1)
19.7.8 Practical Exercise 9
372(1)
19.7.9 Practical Exercise 10
373(1)
19.7.10 Practical Exercise 11
373(1)
19.7.11 Practical Exercise 12
374(1)
19.7.12 Practical Exercise 13
374(1)
19.7.13 Practical Exercise 14
375(1)
19.7.14 Practical Exercise 15
376(1)
19.7.15 Practical Exercise 16
377(1)
19.7.16 Practical Exercise 17
378(1)
19.7.17 Practical Exercise 18
378(1)
19.8 Glossary
379(6)
Index 385
Max Bramer is Emeritus Professor of Information Technology at the University of Portsmouth, England. He has designed and implemented many websites for over 15 years and has made extensive use of PHP and MySQL in his work.

His other Springer publications include successful textbooks on 'Principles of Data Mining' and 'Logic Programming with Prolog'.