Foundation PHP for Dreamweaver 8

Capa
Apress, 9 de nov. de 2006 - 530 páginas
Confession time. When I first started developing dynamic websites with Dreamweaver UltraDev 4, I made a complete mess of things. I believed rather naively that Dreamweaver would “do it all” for me, and that all I needed to do was point and click. The first couple of projects actually went well, giving me a false sense of security. As soon as I attempted anything that didn’t fit into the same p- tern as the basic tutorials, things began to go horribly wrong. Even though I’ve always been happy working with code, one look inside Code view sent shivers up my spine. Part of the problem was that I didn’t have a clear grasp of database structure or of what server-side technology really involved. The other part of the problem was that I was treating Dreamweaver as a WYSIWYG (What You See Is What You Get) program. If I saw something wasn’t in the right place, I just highlighted it in Design view and hit DELETE. What I didn’t realize was that this left behind messy code that caused even the simplest of applications to break. The more I deleted, the worse it got. I don’t want that to happen to you. That’s why I wrote this book.
 

O que estão dizendo - Escrever uma resenha

Não encontramos nenhuma resenha nos lugares comuns.

Conteúdo

Putting the Power of Database Behind Your Pages
212
Choosing the right version
214
Installing MySQL on Windows
215
Removing an older version of MySQL
216
Configuring MySQL Windows Essentials
219
Upgrading to a later series of Windows Essentials
225
Running two series in parallel
226
Changing the default table type on Windows Essentials
227

Looking ahead
11
Dreamweaver and PHP A Productive Partnership
13
Taking a quick first look at Dreamweaver 8s new features
14
A more productive coding environment
15
Support for PHP 5
16
Organizing your workspace
17
Tabbed documents in Mac OS X
18
Saving and sharing customized workspace layouts
20
Getting the best out of Code view
21
Collapsing code sections
22
Formatting code with context menus
24
Using PHP code hints and auto completion
25
Comparing different versions of files
26
Setting up the File Compare feature
27
Comparing two local files in the same site
30
Problems with File Compare
31
Creating standardscompliant code
32
Be aware of potential pitfalls in XHTML
33
Changing the DTD in Dreamweaver 8
35
Treat the DOCTYPE declaration with respect
38
Meet Mark of the Web
40
Watch that cursor
41
Getting the Work Environment Ready
43
Deciding where to test your pages
44
Checking the suitability of your remote server for testing
45
Why not use an allinone package?
46
Deciding where to locate your sites
47
Setting up on Windows
51
Choosing the right web server
52
Starting and stopping Apache on Windows
56
Changing startup preferences or disabling Apache
58
Adding PHP to your Windows startup procedure
65
Configuring Apache to work with PHP
66
Avoiding the Cannot load mysqli extension error
72
Configuring IIS to work with PHP
73
Upgrading and uninstalling Apache and PHP on Windows
77
Setting up on Mac OS X
78
Upgrading PHP on Mac OS X
80
Configuring PHP to display errors on Mac OS X
82
Checking your PHP configuration Windows and Mac
84
Setting up virtual hosts
85
Registering virtual hosts on Windows
86
Registering virtual hosts on Mac OS X
87
Registering virtual directories on IIS
89
Points to watch when using a remote server for testing
95
Now youre set to go
96
Getting Ready for the Case Study
99
Creating the basic structure of EastWest Seasons
101
Installing Lorem and More
103
Styling the page with CSS
111
Attaching the basic styles with link
112
Attaching the remaining styles with import
114
PHP here we come
119
Integrating PHP into Your Site
121
Including text and code from other files
122
Using require instead of include
127
Points to remember when using includes
129
Failed to open stream and other error messages
130
Displaying PHP output with Live Data view
131
Introducing the basics of PHP
133
Using the correct filename extension
134
Handling unknown values with variables
135
Assigning values to a variable
136
Getting to know the various datatypes
137
Indenting code and use of white space
138
Commenting scripts for clarity and debugging
139
Handling text and other output in PHP
142
Choosing single or double quotation marks
143
Using escape sequences in strings
145
Joining strings
146
Adding to an existing string
147
Doing calculations with PHP
148
Combining calculations and assignment
150
Making decisions with PHP
151
Using if else conditional statements
153
Using comparison operators
154
Testing more than one condition
156
Solid foundations
158
Getting Feedback from an Online Form
162
Designing the feedback form
163
Activating the feedback form
168
Organizing related values in arrays
169
Identifying elements in the POST array
171
Improving the feedback form
177
Checking required fields for valid input
179
Improving the look of the email
185
How long does a variable last?
186
Acknowledging the feedback
187
Using Balance Braces
192
Turning the email regular expression into a snippet
193
Changing the sites styles automatically
194
Building an automatic style changer
195
Automating the navigation menu
199
Using loops to handle repetitive tasks
200
The versatile for loop
201
Creating arrays
202
Modularizing code with functions
206
Naming functions
207
Returning values from functions
209
Starting and stopping MySQL manually on Windows
228
Introducing the MySQL monitor on Windows
230
Setting up MySQL on Mac OS X
231
Adding MySQL to your PATH
233
Amending PATH in the tcsh shell
234
Setting the MySQL root password
235
Working with the MySQL monitor on Windows and Mac
237
Using MySQL with a graphical interface
238
Snapping at the heels of phpMyAdmin
241
Now to business
242
Building a Random Quotation Generator
244
Finding your way around phpMyAdmin
245
Creating user accounts for MySQL
246
Granting the necessary user privileges
247
Building the first database table
251
Choosing the right column type
255
Storing text
256
Storing numbers
257
Storing predefined lists
258
Displaying database content
260
Creating and updating database records
271
A great deal achieved
284
Working with Multiple Tables
287
Storing related information in separate tables
288
What foreign key constraints do
290
Splitting the quotations table
291
Deciding on the best structure
298
The four essential SQL commands
300
SELECT
301
INSERT
303
UPDATE
304
Managing content with multiple tables
305
Inserting new quotations
306
Inserting new authors
313
Updating authors
317
Deleting authors
322
Updating quotations
326
The mystery of missing records
327
Deleting quotations
330
Chapter review
331
Using Sessions to Track Visitors and Restrict Access
333
What sessions are and how they work
334
Creating PHP sessions
335
Destroying a session
336
Registering and authenticating users
339
Building custom server behaviors
348
Completing the user registration form
351
Updating and deleting user records
355
Adapting the Sticky Text Field server behavior
356
Building the update and delete pages
358
Creating a login system
364
Restricting access to individual pages
366
Logging out users
367
Installing MX Kollection 3
368
Defining your MX Kollection site preferences
369
Building the user registration and login system
372
Assessing the pros and cons of MX Kollection
376
Two approaches to PHP
377
Displaying a Blog and Photo Gallery
379
Creating the blog backend
380
Building a list of images in a folder
383
Displaying a message when no records are found
386
Formatting dates and time in MySQL
390
Creating striped table rows
393
Finishing the backend
394
Displaying the blog
398
Using Live Data view with a URL parameter
403
Creating an intelligent link
405
Displaying images in a dynamic site
407
Positioning dynamically inserted images
408
Getting an images dimensions dynamically
413
Displaying a photo gallery
415
How the photo gallery is structured
417
Putting the photo gallery together
419
Improving the blog and photo gallery
426
Storing dates in MySQL
427
Mission almost accomplished
431
Using XSLT to Display Live News Feeds and XML
433
A quick guide to XML and XSLT
434
Using clientside and serverside transformations
436
Checking your servers capability
438
Pulling in an RSS news feed
439
How Dreamweaver handles serverside XSLT
440
Choosing a suitable news feed
441
Being a bit more adventurous with XSLT
448
Understanding how XSLT is structured
450
Accessing nested repeating elements
452
Creating conditional regions
453
Sorting elements
456
Displaying output selectively
457
Going further
463
Using Languages Other Than English in MySQL
465
Setting the right sort order
467
Essential MySQL Maintenance
472
Updating the privilege tables after an upgrade
477
What to do if you forget your root password
478
Index
485
Direitos autorais

Outras edições - Visualizar todos

Termos e frases comuns

Passagens mais conhecidas

Página xvii - I've highlighted it like this: Ahem, don't say I didn't warn you. Sometimes code won't fit on a single line in a book. Where this happens, I use an arrow like this: *». This is a very, very long section of code that should be written all *» on the same line without a break.
Página xii - ABOUT THE COVER IMAGE DESIGNER Corne van Dooren designed the front cover image for this book. Having been given a brief by friends of ED to create a new design for the Foundation series, he was inspired to create this new setup combining technology and organic forms. With a colorful background as an avid cartoonist, Corne discovered the infinite world of multimedia at the age of 17 — a journey of discovery that hasn't stopped since. His mantra has always been "The only limit to multimedia is the...

Sobre o autor (2006)

David Powers is an Adobe Community Expert for Dreamweaver and author of a series of highly successful books on PHP, including PHP Solutions: Dynamic Web Design Made Easy and Foundation PHP for Dreamweaver 8. As a professional writer, he has been involved in electronic media for more than 30 years, first with BBC radio and television and more recently with the Internet. His clear writing style is valued not only in the English-speaking world; several of his books have been translated into Spanish and Polish. What started as a mild interest in computing was transformed almost overnight into a passion, when David was posted to Japan in 1987 as BBC correspondent in Tokyo. With no corporate IT department just down the hallway, he was forced to learn how to fix everything himself. When not tinkering with the innards of his computer, he was reporting for BBC television and radio on the rise and collapse of the Japanese bubble economy. Since leaving the BBC to work independently, he has built up an online bilingual database of economic and political analysis for Japanese clients of an international consultancy. When not pounding the keyboard writing books or dreaming of new ways of using PHP and other programming languages, David enjoys nothing better than visiting his favorite sushi restaurant. He has also translated several plays from Japanese.

Informações bibliográficas