دسترسی نامحدود
برای کاربرانی که ثبت نام کرده اند
برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید
در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید
برای کاربرانی که ثبت نام کرده اند
درصورت عدم همخوانی توضیحات با کتاب
از ساعت 7 صبح تا 10 شب
دسته بندی: برنامه نويسي ویرایش: 1 نویسندگان: Lynn Beighley. Michael Morrison سری: ISBN (شابک) : 0596006306, 9780596006303 ناشر: O'Reilly Media سال نشر: 2008 تعداد صفحات: 814 زبان: English فرمت فایل : PDF (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود) حجم فایل: 32 مگابایت
در صورت تبدیل فایل کتاب Head First PHP & MySQL به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.
توجه داشته باشید کتاب سر اولین PHP و آمپر؛ خروجی زیر نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.
Head First PHP و MySQL به ساخت وب سایت های مبتنی بر پایگاه داده با استفاده از PHP و MySQL کمک می کند. این کتاب مملو از مثالهای واقعی، به شما ملزومات برنامهنویسی سمت سرور، از اصول کدنویسی PHP و MySQL گرفته تا موضوعات پیشرفته مانند اعتبار سنجی فرم، شناسههای جلسه، کوکیها، کوئریهای پایگاه داده و اتصالات، عملیات ورودی/خروجی فایل را میآموزد. و مدیریت محتوا توضیحات کامل
Head First PHP and MySQL Helps to build database-driven websites using PHP and MySQL. Packed with real-world examples, this book teaches you the essentials of server-side programming, from the fundamentals of PHP and MySQL coding to advanced topics such as form validation, session IDs, cookies, database queries and joins, file I/O operations, and content management. Full description
Head First PHP & MySQL......Page 7
Author(s) of Head First PHP & MySQL......Page 10
Table of Contents......Page 11
how to use this book: Intro\r......Page 29
Who is this book for?......Page 30
We know what your brain is thinking......Page 31
Metacognition: thinking about thinking......Page 33
Here’s what WE did:......Page 34
Here’s what YOU can do to bend your brain into submission......Page 35
Read Me......Page 36
The technical review team......Page 38
Acknowledgments......Page 39
Safari(R) Books Online......Page 40
1 add life to your static pages: It’s Alive\r......Page 41
HTML is static and boring......Page 42
PHP brings web pages to life......Page 43
Dogs in space......Page 44
A form helps Owen get the whole story......Page 45
Forms are made of HTML......Page 46
The HTML form has problems......Page 48
HTML acts on the CLIENT......Page 50
PHP acts on the SERVER......Page 51
PHP scripts run on the server......Page 52
Use PHP to access the form data......Page 56
PHP scripts must live on a server!......Page 58
Get your PHP scripts to the server......Page 59
The server turns PHP into HTML......Page 62
Deconstructing Owen’s PHP script......Page 64
A few PHP rules to code by......Page 65
Finding the perfect variable name......Page 66
Variables are for storing script data......Page 71
$_POST is a special variable that holds form data......Page 73
$_POST transports form data to your script......Page 74
Creating the email message body with PHP......Page 84
Even plain text can be formatted... a little......Page 86
Newlines need double-quoted strings......Page 87
Assemble an email message for Owen......Page 88
Variables store the email pieces and parts......Page 89
Sending an email message with PHP......Page 90
Owen starts getting emails......Page 93
Owen starts losing emails......Page 94
Your PHP & MySQL Toolbox......Page 97
2 Connecting to MySQL:\r How it fits together......Page 99
Owen’s PHP form works well. Too well.........Page 100
MySQL excels at storing data......Page 101
Owen needs a MySQL database......Page 102
Create a MySQL database and table......Page 104
The INSERT statement in action......Page 107
Use SELECT to get table data......Page 110
Let PHP handle the tedious SQL stuff......Page 113
PHP lets data drive Owen’s web form......Page 114
Connect to your database from PHP......Page 116
Insert data with a PHP script......Page 117
Use PHP functions to talk to the database......Page 118
Get connected with mysqli_connect()......Page 120
Build the INSERT query in PHP......Page 125
Query the MySQL database with PHP......Page 126
Close your connection with mysqli_close()......Page 127
$_POST provides the form data......Page 131
Owen needs help sifting through his data......Page 136
Owen’s on his way to finding Fang......Page 138
3 create and populate a database: Creating your own data\r......Page 143
The Elvis store is open for business......Page 144
Elmer needs an application......Page 145
Visualize Elmer’s application design......Page 146
It all starts with a table......Page 149
Make contact with the MySQL server......Page 150
Create a database for Elmer’s emails......Page 151
Create a table inside the database......Page 152
We need to define our data......Page 153
Take a meeting with some MySQL data types......Page 154
Create your table with a query......Page 157
Getting the table in front of the database......Page 159
USE the database before you use it......Page 160
DESCRIBE reveals the structure of tables......Page 163
Elmer’s ready to store data......Page 165
Create the Add Email script......Page 166
The other side of Elmer’s application......Page 173
The nuts and bolts of the Send Email script......Page 174
First things first, grab the data......Page 175
mysqli_fetch_array() fetches query results\r......Page 176
Looping for a WHILE......Page 179
Looping through data with while......Page 180
You’ve got mail...from Elmer!......Page 185
Sometimes people want out......Page 186
Removing data with DELETE......Page 187
Use WHERE to DELETE specific data......Page 188
Minimize the risk of accidental deletions......Page 189
MakeMeElvis.com is a web application......Page 194
Your PHP & MySQL Toolbox......Page 197
4 realistic and practical applications: Your Application on the Web\r......Page 199
Elmer has some irritated customers......Page 200
Protecting Elmer from... Elmer......Page 203
Demand good form data......Page 204
The logic behind Send Email validation......Page 205
Your code can make decisions with IF......Page 206
Testing for truth......Page 207
IF checks for more than just equality......Page 208
The logic behind Send Email validation......Page 211
PHP functions for verifying variables......Page 212
Test multiple conditions with AND and OR......Page 219
Form users need feedback......Page 223
Ease in and out of PHP as needed......Page 233
Use a flag to avoid duplicate code......Page 234
Code the HTML form only once......Page 235
A form that references itself......Page 239
Point the form action at the script......Page 240
Check to see if the form has been submitted......Page 242
Some users are still disgruntled......Page 246
What Elmer’s table should contain:......Page 248
The five rules of primary keys:......Page 250
From checkboxes to customer IDs......Page 255
Loop through an array with foreach......Page 256
Your PHP & MySQL Toolbox......Page 261
5 working with data stored in files: When a database just isn\'t enough\r......Page 263
Text can\'t be trusted......Page 264
The proof is in the picture......Page 265
The application needs to store images......Page 266
Planning for image file uploads in Guitar Wars......Page 271
The high score database must be ALTERed......Page 272
How do we get an image from the user?......Page 276
Insert the image filename into the database......Page 278
Find out the name of the uploaded file......Page 279
Where did the uploaded file go?......Page 284
Create a home for uploaded image files......Page 288
Shared data has to be shared......Page 294
Shared script data is required......Page 295
Think of require_once as \"insert\"......Page 296
Order is everything with high scores......Page 298
Honoring the top Guitar Warrior......Page 301
Format the top score with HTML and CSS......Page 302
Only small images allowed......Page 307
File validation makes the app more robust......Page 308
Plan for an Admin page......Page 312
Generate score removal links on the Admin page......Page 315
Scripts can communicate with each other......Page 316
Of GETs and POSTs......Page 318
GET, POST, and high score removal......Page 320
Isolate the high score for deletion......Page 323
Control how much you delete with LIMIT......Page 324
Your PHP & MySQL Toolbox......Page 333
6 securing your application: Assume they\'re all out to get you\r......Page 335
The day the music died......Page 336
Where did the high scores go?......Page 337
Securing the teeming hordes......Page 339
Protecting the Guitar Wars Admin page......Page 340
HTTP authentication requires headers......Page 342
Take control of headers with PHP......Page 345
Authenticating with headers......Page 346
OK, so maybe Guitar Wars is NOT secure......Page 352
Create an Authorize script......Page 354
Guitar Wars Episode II : Attack of the High Score Clones\r......Page 358
Subtraction by addition......Page 359
Security requires humans......Page 360
Plan for moderation in Guitar Wars......Page 361
Make room for approvals with ALTER......Page 362
Unapproved scores aren’t worthy......Page 367
The million-point hack......Page 370
Everything in moderation... ?......Page 371
How exactly did she do it?......Page 373
Tricking MySQL with comments......Page 374
The Add Score form was SQL injected......Page 375
Protect your data from SQL injections......Page 376
A safer INSERT (with parameters)......Page 377
Form validation can never be too smart......Page 379
Cease fire!......Page 381
Your PHP & MySQL Toolbox......Page 382
7 building personalized web apps: Remember me?\r......Page 385
They say opposites attract......Page 386
Mismatch is all about personal data......Page 387
Mismatch needs user log-ins......Page 388
Come up with a user log-in gameplan......Page 389
Prepping the database for log-ins......Page 391
Constructing a log-in user interface......Page 393
Encrypt passwords with SHA()......Page 394
Making room for the encrypted password......Page 395
Authorizing users with HTTP......Page 398
Logging In Users with HTTP Authentication......Page 401
A form for signing up new users......Page 405
Give users a chance to sign up......Page 410
Sometimes you just need a cookie......Page 414
What’s in a cookie?......Page 415
Use cookies with PHP......Page 416
Rethinking the flow of log-ins......Page 419
A cookie-powered log-in......Page 420
Navigating the Mismatch application......Page 422
Logging out means deleting cookies......Page 425
Sessions aren’t dependent on the client......Page 429
The life and times of sessions......Page 430
Keeping up with session data......Page 431
Renovate Mismatch with sessions......Page 432
Log out with sessions......Page 433
Complete the session transformation......Page 438
Users aren’t feeling welcome......Page 444
Sessions are short-lived.........Page 446
... but cookies can last forever!......Page 447
Sessions + Cookies = Superior log-in persistence......Page 449
Your PHP & MySQL Toolbox......Page 454
7 1/2 eliminate duplicate code: Sharing is caring\r......Page 457
Mismatch is in pieces......Page 461
Rebuilding Mismatch from a template......Page 462
Rebuild Mismatch with templates......Page 464
Mismatch is whole again... and much better organized......Page 466
8 control your data, control your world: Harvesting data\r......Page 467
Making the perfect mismatch......Page 468
Mismatching is all about the data......Page 469
Break down the Mismatch data......Page 470
Model a database with a schema......Page 471
Wire together multiple tables......Page 476
Foreign keys in action......Page 477
Tables can match row for row......Page 478
One row leads to many......Page 479
Matching rows many-to-many......Page 480
Build a Mismatch questionnaire......Page 485
Get responses into the database......Page 486
We can drive a form with data......Page 490
Speaking of efficiency.........Page 495
Generate the Mismatch questionnaire form......Page 496
The data is now driving the form......Page 500
Strive for a bit of normalcy......Page 502
When normalizing, think in atoms......Page 503
Why be normal, really?......Page 504
Three steps to a normal database......Page 505
Altering the Mismatch database......Page 509
So is Mismatch really normal?......Page 510
A query within a query within a query.........Page 512
Let’s all join tables......Page 513
Connect with dots......Page 514
Surely we can do more with inner joins......Page 515
Simplifying ON with USING......Page 516
Nicknames for tables and columns......Page 517
Joins to the rescue......Page 518
Love is a numbers game......Page 524
Five steps to a successful mismatch......Page 525
Prepare for the mismatch search......Page 526
Compare users for \"mismatchiness\"......Page 527
All we need is a FOR loop......Page 528
Finishing the mismatching......Page 531
Your PHP & MySQL Toolbox......Page 539
9 string and custom functions: Better living through functions\r......Page 541
A good risky job is hard to find......Page 542
The search leaves no margin for error......Page 544
SQL queries can be flexible with LIKE......Page 545
Explode a string into individual words......Page 550
implode() builds a string from substrings......Page 553
Preprocess the search string......Page 559
Replace unwanted search characters......Page 560
The query needs legit search terms......Page 564
Copy non-empty elements to a new array......Page 565
Sometimes you just need part of a string......Page 568
Extract substrings from either end......Page 569
Multiple queries can sort our results......Page 572
Functions let you reuse code......Page 576
Build a query with a custom function......Page 577
SWITCH makes far more decisions than IF......Page 582
Give build query() the ability to sort......Page 585
We can paginate our results......Page 588
Get only the rows you need with LIMIT......Page 589
Control page links with LIMIT......Page 590
Keep track of the pagination data......Page 591
Set up the pagination variables......Page 592
Revise the query for paginated results......Page 593
Generate the page navigation links......Page 594
Putting together the complete Search script......Page 597
The complete Search script, continued.........Page 598
Your PHP & MySQL Toolbox......Page 600
10 regular expressions: Rules for replacement\r......Page 601
Risky Jobs lets users submit resumes......Page 602
Decide what your data should look like......Page 606
Formulate a pattern for phone numbers......Page 609
Match patterns with regular expressions......Page 610
Build patterns using metacharacters......Page 612
Fine-tune patterns with character classes......Page 619
Check for patterns with preg_match()......Page 624
Standardize the phone number data......Page 631
Get rid of the unwanted characters......Page 632
Matching email addresses can be tricky......Page 636
Domain suffixes are everywhere......Page 638
Use PHP to check the domain......Page 639
Email validation: putting it all together......Page 640
Your PHP & MySQL Toolbox......Page 644
11 visualizing your data... and more!: Drawing dynamic graphics \r......Page 645
Guitar Wars Reloaded: Rise of the Machines......Page 646
No input form is safe......Page 647
We need to separate man from machine......Page 648
We can defeat automation with automation......Page 651
Generate the CAPTCHA pass-phrase text......Page 653
Visualizing the CAPTCHA image......Page 654
Inside the GD graphics functions......Page 656
The GD graphics functions continued.........Page 658
Drawing text with a font......Page 660
Generate a random CAPTCHA image......Page 663
Returning sanity to Guitar Wars......Page 665
Add CAPTCHA to the Add Score script......Page 667
Five degrees of opposability......Page 670
Charting mismatchiness......Page 671
Storing bar graph data......Page 672
From one array to another......Page 676
Build an array of mismatched topics......Page 678
Formulating a bar graphing plan......Page 679
Crunching categories......Page 680
Doing the category math......Page 681
Bar graphing basics......Page 684
Draw and display the bar graph image......Page 687
Individual bar graph images for all......Page 690
Mismatch users are digging the bar graphs......Page 693
Your PHP & MySQL Toolbox......Page 694
12 syndication and web services: Interfacing to the world\r......Page 697
Owen needs to get the word out about Fang......Page 698
Push alien abduction data to the people......Page 699
RSS pushes web content to the people......Page 700
RSS is really XML......Page 701
From database to newsreader......Page 706
Visualizing RSS......Page 709
Dynamically generate an RSS feed......Page 712
Link to the RSS feed......Page 716
A video is worth a million words......Page 718
Pulling web content from others......Page 720
Syndicating YouTube videos......Page 721
Make a YouTube video request......Page 722
Owen is ready to build a REST request......Page 726
YouTube speaks XML......Page 730
Deconstruct a YouTube XML response......Page 734
Visualize the XML video data......Page 735
Access XML data with objects......Page 736
From XML elements to PHP objects......Page 737
Drill into XML data with objects......Page 738
Not without a namespace!......Page 739
Fang sightings are on the rise......Page 741
Lay out videos for viewing......Page 742
Format video data for display......Page 743
Your PHP & MySQL Toolbox......Page 751
The End.......Page 752
appendix i: leftovers: The Top Ten Topics (we didn\'t cover)\r......Page 753
#1. Retrofit this book for PHP4 and mysql functions......Page 754
#2. User permissions in MySQL......Page 756
#3. Error reporting for MySQL......Page 758
#4. Exception handling PHP errors......Page 759
#4. Exception handling PHP errors (cont.)......Page 760
#5. Object-oriented PHP......Page 761
So two big advantages of using Object Oriented PHP are:......Page 762
#6. Securing your PHP application......Page 763
#6. Securing your PHP application (cont.)......Page 764
#7. Protect your app from cross-site scripting......Page 765
Data is guilty until proven innocent......Page 766
#8. Operator precedence......Page 767
More Unicode support......Page 768
OO refinements, XML support, and other changes......Page 769
WordPress......Page 770
appendix ii: set up a development environment: A place to play\r......Page 771
Find out what you have......Page 772
Do you have PHP? Which version?......Page 773
Do you have MySQL? Which version?......Page 774
Start with the Web Server......Page 775
PHP installation......Page 776
PHP installation steps......Page 777
Instructions and Troubleshooting......Page 778
Steps to Install MySQL on Windows......Page 779
Download your installer......Page 780
Click \"Install\" and you’re done!......Page 781
Steps to Install MySQL on Mac OS X......Page 782
Moving from production to a live site......Page 784
Prepare to use your dumped data......Page 785
Move dumped data to the live server......Page 786
Connect to the live server......Page 787
appendix iii: extend your php: Get even more\r......Page 789
If you’re using Windows, you’re in luck......Page 790
And on the Mac.........Page 793
A......Page 795
B......Page 796
C......Page 797
D......Page 798
E......Page 799
F......Page 800
G......Page 801
I......Page 802
M......Page 803
N......Page 805
P......Page 807
R......Page 809
S......Page 810
T......Page 812
V......Page 813
Y......Page 814