Curso php y mysql

Páginas: 53 (13028 palabras) Publicado: 28 de octubre de 2010
Building a Database-Driven Web Site Using PHP and MySQL
by Kevin Yank

Introduction 2
Part 1: Installation 3
Welcome to the Show 3
Installation under Windows 3
Installing under Linux 4
Installing MySQL under Linux 5
Installing PHP under Linux 6
Post-Installation Setup Tasks 7
If Your Web Host Provides PHP and MySQL 8
Your First PHP Script 8
Part 2:Getting Started with MySQL 9
An Introduction to Databases 9
Logging onto MySQL 10
So what's SQL? 11
Inserting Data into a Table 13
Modifying Stored Data 14
Part 3: Getting Started with PHP 15
Presenting PHP 15
Basic Syntax and Commands 16
User Interaction and Forms 18
Control Structures 19
Multi-Purpose Pages 21
Part 4: Publishing MySQL Data on the Web 23A Look Back at First Principles 23
Connecting to MySQL with PHP 24
Performing SQL Queries with PHP 25
Handling SELECT Result Sets 26
Inserting Data into the Database 27
A Challenge 29
Challenge Solution 30
Part 5: Relational Database Design 32
Giving Credit where Credit is Due 32
Rule of Thumb: Keep Things Separate 32
Dealing with Multiple Tables 34Simple Data Relationships 36
Many-to-Many Relationships 37
Part 6: A Content Management System 39
The Front Page 39
Managing Authors 40
Adding Authors 41
Managing Categories 43
Managing Jokes (cont'd.) 45
Managing Jokes (cont'd.) 47
Managing Jokes (cont'd.) 48
Wrap-up 50
Part 7: Content Formatting and Submission 50
Out with the Old… 50
RegularExpressions 51
String Replacement with Regular Expressions 52
Hyperlinks 53
Splitting Text into Pages 54
Putting it all Together 55
Automatic Content Submission 56
Wrap-Up 57
Part 8: MySQL Administration 57
Why Standard Backups aren't Enough 58
Database Backups using mysqldump 58
Incremental Backups using Update Logs 59
MySQL Access Control 60
Using GRANT(cont'd.) 61
Access Control Tips 62
Locked Out? 63
Checking and Repairing MySQL Data Files 63
Checking and Repairing MySQL Data Files (cont'd.) 64
Part 9: Advanced SQL 65
Sorting SELECT Query Results 65
Setting LIMITs 66
LOCKing TABLES 67
Column and Table Name Aliases 67
GROUPing SELECT Results 69
LEFT JOINs 70
Limiting Results with HAVING 71Wrap-up 72
Part 10: Advanced PHP 72
Server-Side Includes with PHP 73
Increasing Security with Includes 74
Semi-Dynamic Pages 74
Handling File Uploads 77
Assigning Unique File Names 78
Email in PHP 79
Wrap-up and Thanks 80

Introduction

On the Web today, content is king. After you've mastered HTML and learned a few neat tricks in JavaScript and Dynamic HTML, you canprobably build a pretty impressive-looking Web site design. But then comes the time to fill that fancy page layout with some real information. Any site that successfully attracts repeat visitors has to have fresh and constantly updated content. In the world of traditional site building, that means HTML files--and lots of 'em.
The problem is that, more often than not, the people providing thecontent for a site are not the same people handling its design. Oftentimes, the content provider doesn't even know HTML. How, then, is the content to get from the provider onto the Web site? Not every company can afford to staff a full-time Webmaster, and most Webmasters have better things to do than copying Word files into HTML templates anyway.
Maintenance of a content-driven site can be a realpain, too. Many sites (perhaps yours?) feel locked into a dry, outdated design because rewriting those hundreds of HTML files to reflect a new design would take forever. Server-side includes (SSI's) can help alleviate the burden a little, but you still end up with hundreds of files that need to be maintained should you wish to make a fundamental change to your site.
The solution to these headaches...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • mysql & php
  • php mysql
  • Php mysql
  • Mysql Y Php
  • php/mysql
  • php curso
  • curso php
  • Curso de php

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS