LibCoder

Learning PHP, MySQL & JavaScript: A Step-by-Step Guide to Creating Dynamic Websites. 7 Ed

1C Agda DataBase (SQL)
Learning PHP, MySQL & JavaScript: A Step-by-Step Guide to Creating Dynamic Websites. 7 Ed
Автор: Nixon Robin
Дата выхода: 2025
Издательство: O’Reilly Media, Inc.
Количество страниц: 655
Размер файла: 5,3 МБ
Тип файла: PDF
Добавил: LibCoder
Оглавление
Preface xix1. Introduction to Dynamic Web Content 1HTTP and HTML: Berners-Lee’s Basics 2The Request/Response Procedure 3The Benefits of PHP, MySQL, JavaScript, CSS, and HTML 5MariaDB: The MySQL Clone 6Using PHP 7Using MySQL 8Using JavaScript 9Using CSS 10And Then There’s HTML5 11The Apache Web Server 12Node.js: An Alternative to Apache 13About Open Source 14Bringing It All Together 14Questions 162. Setting Up a Development Server 17What Is a WAMP, MAMP, or LAMP? 18Installing AMPPS on Windows 18Testing the Installation 23Accessing the Document Root (Windows) 25Alternative WAMPs 26Installing AMPPS on macOS 27Installing a LAMP on Linux 29Working Remotely 29Logging In 29Transferring Files 30Using a Code Editor 31Questions 323. Introduction to PHP 33Incorporating PHP Within HTML 33This Book’s Examples 35The Structure of PHP 35Using Comments 35Basic Syntax 36Variables 37Operators 42Variable Assignment 46Multiline Strings 49Variable Typing 52Constants 53Predefined Constants 53The Difference Between the echo and print Commands 54Functions 55Variable Scope 56Questions 624. Expressions and Control Flow in PHP 63Expressions 63TRUE or FALSE? 64Literals and Variables 65Operators 66Operator Precedence 67Associativity 69Relational Operators 70Conditionals 74The if Statement 75The else Statement 76The elseif Statement 78The switch Statement 79The ? (or Ternary) Operator 82Looping 83while Loops 84do...while Loops 86for Loops 86Breaking Out of a Loop 88The continue Statement 89Implicit and Explicit Casting 90PHP Modularization 91Questions 925. PHP Functions and Objects 93PHP Functions 94Defining a Function 96Returning a Value 96Returning an Array 98Returning Global Variables 98Recap of Variable Scope 99Including and Requiring Files 99The include Statement 100Using include_once 100Using require and require_once 101PHP Version Compatibility 101PHP Objects 102Terminology 102Declaring a Class 104Creating an Object 105Accessing Objects 105Cloning Objects 106Constructors 108Destructors 108Writing Methods 109Declaring Properties 110Static Methods 110Declaring Constants 111Property and Method Scope 112Static Properties 113Inheritance 114Questions 1186. PHP Arrays 119Basic Access 119Numerically Indexed Arrays 119Associative Arrays 121Assignment Using the array Keyword 122The foreach...as Loop 123Multidimensional Arrays 125Using Array Functions 129is_array 129count 129sort 129shuffle 130explode 130compact 131reset 132end 133Questions 1337. Practical PHP 135Using printf 135Precision Setting 137String Padding 138Using sprintf 139Date and Time Functions 140Date Constants 142Using checkdate 143File Handling 143Checking Whether a File Exists 143Creating a File 144Reading from Files 145Copying Files 146Moving a File 147Deleting a File 147Updating Files 148Locking Files for Multiple Accesses 149Reading an Entire File 151Uploading Files 152System Calls 157Questions 1598. Introduction to MySQL 161MySQL Basics 161Key Database Terms 162Accessing MySQL via the Command Line 162Starting the Command-Line Interface 163Using the Command-Line Interface 167MySQL Commands 168Data Types 173Indexes 184Creating an Index 184Querying a MySQL Database 190Joining Tables 201Using Logical Operators 204MySQL Functions 205Accessing MySQL via phpMyAdmin 205Questions 2079. Mastering MySQL 209Database Design 209Primary Keys: The Keys to Relational Databases 210Normalization 211First Normal Form 212Second Normal Form 214Third Normal Form 217When Not to Use Normalization 219Relationships 219One-to-One 220One-to-Many 220Many-to-Many 221Databases and Privacy 223Transactions 223Transaction Storage Engines 223Using START TRANSACTION 225Using COMMIT 225Using ROLLBACK 225Using EXPLAIN 226Backing Up and Restoring 228Using mysqldump 228Creating a Backup File 230Restoring from a Backup File 232Dumping Data in CSV Format 233Planning Your Backups 233Questions 23410. Accessing MySQL Using PHP 235Querying a MySQL Database with PHP 235The Process 235Creating a Login File 236Connecting to a MySQL Database 238Building and Executing a Query 239Fetching a Result 239Fetching a Row While Specifying the Style 241Closing a Connection 242A Practical Example 243The $_POST Array 246Deleting a Record 247Displaying the Form 247Querying the Database 248Running the Program 249Practical MySQL 250Creating a Table 250Describing a Table 251Dropping a Table 252Adding Data 253Retrieving Data 254Updating Data 255Deleting Data 255Using AUTO_INCREMENT 256Performing Additional Queries 257Preventing Hacking Attempts 259Steps You Can Take 260Using Placeholders 261Preventing JavaScript Injection into HTML 264Questions 26611. Form Handling 267Building Forms 267Retrieving Submitted Data 269Default Values 270Input Types 271Sanitizing Input 283An Example Program 284Questions 28712. Cookies, Sessions, and Authentication 289Using Cookies in PHP 289Setting a Cookie 291Accessing a Cookie 292Destroying a Cookie 292HTTP Authentication 292Storing Usernames and Passwords 296An Example Program 298Using Sessions 301Starting a Session 302Ending a Session 304Setting a Timeout 305Session Security 306Questions 30913. Exploring JavaScript 311Outputting the Results 312Using console.log 312Using alert 312Writing into Elements 312Using document.write 312JavaScript and HTML Text 313Using Scripts Within a Document Head 315Including JavaScript Files 315Debugging JavaScript Errors 316Using Comments 316Semicolons 317Variables 317String Variables 318Numeric Variables 318Arrays 318Operators 319Arithmetic Operators 319Assignment Operators 320Comparison Operators 320Logical Operators 321Incrementing, Decrementing, and Shorthand Assignment 321String Concatenation 321Escape Characters 322Variable Typing 322Functions 324Global Variables 324Local Variables 325Using let 326Using const 327The Document Object Model 328Another Use for the $ Symbol 330Using the DOM 330Questions 33214. Expressions and Control Flow in JavaScript 333Expressions 333Literals and Variables 334Operators 335Operator Precedence 336Associativity 337Relational Operators 337Using onerror 342Using try...catch 343Conditionals 344The if Statement 344The else Statement 344The switch Statement 345The ? Operator 347Looping 347while Loops 348do...while Loops 348for Loops 349Breaking Out of a Loop 350The continue Statement 351Explicit Casting 351Questions 35215. JavaScript Functions, Objects, and Arrays 353JavaScript Functions 353Defining a Function 353Returning a Value 356Returning an Array 358JavaScript Objects 359Declaring a Class 359Creating an Instance 360Accessing Objects 360Static Methods and Properties 361The Legacy Objects Simulated with Functions 361JavaScript Arrays 363Arrays 363Associative Arrays 364Multidimensional Arrays 365Using Array Methods 366Anonymous Functions 372Arrow Functions 373Questions 37316. JavaScript and PHP Validation and Error Handling 375Validating User Input with JavaScript 375The validate.html Document (Part 1) 376The validate.html Document (Part 2) 379Regular Expressions 383Matching Through Metacharacters 383Wildcard Matching 384Grouping Through Parentheses 385Character Classes 386Indicating a Range 386Negation 386Some More Complicated Examples 387Summary of Metacharacters 389General Modifiers 391Using Regular Expressions in JavaScript 391Using Regular Expressions in PHP 392Redisplaying a Form After PHP Validation 393Questions 40017. Using Asynchronous Communication 403The Fetch API 403Your First Asynchronous Program 404The Server Half of the Asynchronous Process 406Cross-Origin Resource Sharing (CORS) 407Using GET Instead of POST 409Sending JSON Requests 410Using XMLHttpRequest 412Using Frameworks for Asynchronous Communication 413Questions 41318. Advanced CSS 415Attribute Selectors 416The ^= Operator 417The $= Operator 417The *= Operator 417The box-sizing Property 417CSS Backgrounds 418The background-clip Property 419The background-origin Property 421The background-size Property 421Using the auto Value 422Multiple Backgrounds 422CSS Borders 425The border-color Property 425The border-radius Property 426Box Shadows 428Element Overflow 429Multicolumn Layout 429Colors and Opacity 431HSL Colors 431HSLA Colors 432RGB Colors 432RGBA Colors 433The opacity Property 433Text Effects 433The text-shadow Property 433The text-overflow Property 434The word-wrap Property 435Web Fonts 435Google Web Fonts 436Transformations 438Transitions 440Properties to Transition 440Transition Duration 441Transition Delay 441Transition Timing 441Shorthand Syntax 442Flexbox 444Flex Items 445Flow Direction 445Justifying Content 447Aligning Items 449Aligning Content 450Resizing Items 451Flex Wrap 451Order 453Item Gaps 453CSS Grid 454Grid Container 454Grid Columns and Rows 455Grid Flow 456Placing Grid Items 457Grid Gaps 458Alignment 459Questions 46019. Accessing CSS from JavaScript 463Revisiting the getElementById Function 463The byId Function 464The style Function 464The by Function 465Including the Functions 465Accessing CSS Properties from JavaScript 466Some Common Properties 466Other Properties 468Inline JavaScript 469The this Keyword 470Attaching Events to Objects in a Script 470Attaching to Other Events 471Adding New Elements 472Removing Elements 474Alternatives to Adding and Removing Elements 474Time-based Events 475Using setTimeout 475Using setInterval 476Using Time-Based Events for Animation 478Questions 48020. Introduction to React 483What Is the Point of React Anyway? 484Accessing the React Files 485Including babel.js 486Our First React Project 487Using a Class Instead of a Function 488Pure and Impure Code: A Golden Rule 489Using Both a Class and a Function 490Props and Components 490The Differences Between Using a Class and a Function 492React State and Life Cycle 492Events in React 495Inline JSX Conditional Statements 497Using Lists and Keys 498Unique Keys 499Handling Forms 501Using Text Input 501Using textarea 503Using select 504React Native 506Questions 50621. Introduction to Node.js 509Installing Node.js on Windows 510Installing Node.js on macOS 516Installing Node.js on Linux 519Getting Started with Node.js 520Building a Functioning Web Server 522Working with Modules 525Built-in Modules 526Installing Modules with npm 526Accessing MySQL 527Further Information 529Questions 53022. Bringing It All Together 531Designing a Social Networking App 532Online Repository 532functions.php 532header.php 535setup.php 537index.php 539signup.php 540Checking for Username Availability 541Logging In 541checkuser.php 543login.php 544profile.php 547Adding the “About Me” Text 547Adding a Profile Image 547Processing the Image 548Displaying the Current Profile 548members.php 551Viewing a User’s Profile 552Adding and Dropping Friends 552Listing All Members 552friends.php 555messages.php 558logout.php 562styles.css 562javascript.js 566Questions 566A. Solutions to the Chapter Questions 567Index 587

Описание

Коротко и по делу о том, что важно знать про mysql.

Build interactive, data-driven websites with the potent combination of open source technologies and web standards, even if you have only basic HTML knowledge. With the latest edition of this popular hands-on guide, you'll tackle dynamic web programming using the most recent versions of today's core technologies: PHP, MySQL, JavaScript, CSS, HTML5, jQuery, Node.js, and the powerful React library.

Web designers will learn how to use these technologies together while picking up valuable web programming practices along the way, including how to optimize websites for mobile devices. You'll put everything together to build a fully functional social networking site suitable for both desktop and mobile browsers.

Explore MySQL from database structure to complex queries

Use the MySQL PDO 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

Use Ajax calls for background browser-server communication

Style your web pages by acquiring CSS skills

Reformat your websites into mobile web apps

Learn to use enhanced CSS features, such as CSS Grid and Flexbox

Если материал оказался полезен — сохраните страницу.

mysql websites dynamic technologies mobile javascript step guide

Частые вопросы

Можно ли скачать «Learning PHP, MySQL & JavaScript: A Step-by-Step Guide to Creating Dynamic Websites. 7 Ed» бесплатно?

Да, «Learning PHP, MySQL & JavaScript: A Step-by-Step Guide to Creating Dynamic Websites. 7 Ed» доступна для бесплатного скачивания на нашем сайте в формате PDF. Ссылка на файл находится на этой странице.

В каком формате и какого размера файл?

Книга предоставляется в формате PDF, размер файла 5,3 МБ.

Кто автор и когда вышла книга?

автор — Nixon Robin, издательство O’Reilly Media, Inc., год выпуска 2025, 655 страниц.

О чём книга «Learning PHP, MySQL & JavaScript: A Step-by-Step Guide to Creating Dynamic Websites. 7 Ed»?

Build interactive, data-driven websites with the potent combination of open source technologies and web standards, even if you have only basic HTML knowledge.

Похожие материалы