Head First PHP & MySQL: [Discover the secrets behind dynamic, database-driven sites, avoid embarrassing mishaps with web forms, load all the key syntax directly into your brain, hook up your PHP and MySQL code, flex your scripting knowledge with dozens of exercises]
Gespeichert in:
Hauptverfasser: | , |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Sebastopol, Calif.
O'Reilly
2009
|
Schriftenreihe: | O'Reilly's head first series
|
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | XXXVIII, 774 S. Ill., graph. Darst. |
ISBN: | 9780596006303 |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV035833694 | ||
003 | DE-604 | ||
005 | 20200507 | ||
007 | t | ||
008 | 091118s2009 ad|| |||| 00||| eng d | ||
020 | |a 9780596006303 |9 978-0-596-00630-3 | ||
035 | |a (OCoLC)634989349 | ||
035 | |a (DE-599)BVBBV035833694 | ||
040 | |a DE-604 |b ger |e rakwb | ||
041 | 0 | |a eng | |
049 | |a DE-M347 |a DE-11 |a DE-739 | ||
084 | |a ST 250 |0 (DE-625)143626: |2 rvk | ||
084 | |a ST 271 |0 (DE-625)143639: |2 rvk | ||
100 | 1 | |a Beighley, Lynn |d 19XX- |e Verfasser |0 (DE-588)133926443 |4 aut | |
245 | 1 | 0 | |a Head First PHP & MySQL |b [Discover the secrets behind dynamic, database-driven sites, avoid embarrassing mishaps with web forms, load all the key syntax directly into your brain, hook up your PHP and MySQL code, flex your scripting knowledge with dozens of exercises] |c Lynn Beighley ; Michael Morrison |
264 | 1 | |a Sebastopol, Calif. |b O'Reilly |c 2009 | |
300 | |a XXXVIII, 774 S. |b Ill., graph. Darst. | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
490 | 0 | |a O'Reilly's head first series | |
650 | 0 | 7 | |a PHP |0 (DE-588)4546126-0 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a PHP 5.3 |0 (DE-588)7638375-1 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a MySQL |0 (DE-588)4559381-4 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a MySQL 5.1 |0 (DE-588)7574874-5 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a PHP |0 (DE-588)4546126-0 |D s |
689 | 0 | 1 | |a MySQL |0 (DE-588)4559381-4 |D s |
689 | 0 | |8 1\p |5 DE-604 | |
689 | 1 | 0 | |a PHP 5.3 |0 (DE-588)7638375-1 |D s |
689 | 1 | |8 2\p |5 DE-604 | |
689 | 2 | 0 | |a MySQL 5.1 |0 (DE-588)7574874-5 |D s |
689 | 2 | |8 3\p |5 DE-604 | |
700 | 1 | |a Morrison, Michael |e Verfasser |4 aut | |
856 | 4 | 2 | |m Digitalisierung UB Passau - ADAM Catalogue Enrichment |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=018692174&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-018692174 | ||
883 | 1 | |8 1\p |a cgwrk |d 20201028 |q DE-101 |u https://d-nb.info/provenance/plan#cgwrk | |
883 | 1 | |8 2\p |a cgwrk |d 20201028 |q DE-101 |u https://d-nb.info/provenance/plan#cgwrk | |
883 | 1 | |8 3\p |a cgwrk |d 20201028 |q DE-101 |u https://d-nb.info/provenance/plan#cgwrk |
Datensatz im Suchindex
_version_ | 1804140797673603072 |
---|---|
adam_text | table or contents Table of Contents (Ѕшчиагу) Intro xxvii 1 It’s Alive: Add Life to Your Static Pages 1 2 How It Fits Together: Connecting to MySQL 59 3 Creating Your Own Data: Create and Populate a Database 103 4 Your Application on the Web: Realistic and Practical Applications 159 5 When a Database Just Isn’t Enough: Working With Data Stored in Files 223 6 Assume They’re All Out to Get You: Securing Your Application 295 7 Remember Me?: Building Personalized Web Apps 345 7 /շ Sharing is Caring: Eliminate Duplicate Code 417 8 Harvesting Data: Control Your Data, Control Your World 427 9 Better Living Through Functions: String and Custom Functions 501 10 Rules for Replacement: Regular Expressions 561 11 Drawing Dynamic Graphics: Visualizing Your Data... and More! 605 12 Interfacing to the World: Syndication and Web Services 657 i The Top Ten Topics (We Didn’t Cover): Leftovers 713 ii A Place to Play: Set Up a Development Environment 731 iii Get Even More: Extend Your PHP 749 Table of Contents (the real tiling) Intro Your brain on PHP MySQL. Here you are trying to learn something, while here your brain is doing you a favor by making sure the learning doesn t stick. Your brain s thinking, Better leave room for more important things, like which wild animals to avoid and whether underwater yoga is a bad idea. So how do you trick your brain into thinking that your life depends on knowing PHP and MySQL? Who is this book for? xxviii We know what you’re thinking xxix Metacognition xxxi Bend your brain into submission xxxiii Read me xxxiv The technical review team xxxvi
Acknowledgments xxxvii ІХ
table o¡ contents ądd Me to уощ siittiö pages It’s Alive You’ve been creating great web pages with HTML, and a Sprinkling Of CSS. But you’ve noticed that visitors to your site can’t do much other than passively look at the content on the pages. The communication’s one-way, and you’d like to change that. In fact, you’d really like to know what your audience is thinking. But you need to be able to allow users to enter information into a web form so that you can find out what’s on their minds. And you need to be able to process the information and have it delivered to you. It sounds as if you’re going to need more than HTML to take your site to the next level. Have you seen him? Ψ X HTML is static and boring 2 PHP brings web pages to life 3 A form helps Owen get the whole story 5 Forms are made of HTML 6 The HTML form has problems 8 HTML acts on the client 10 PHP acts on the server 11 PHP scripts run on the server 12 Use PHP to access the form data 16 PHP scripts must live on a server! 18 The server turns PHP into HTML 22 A few PHP rules to code by 25 Finding the perfect variable name 26 Variables are for storing script data 31 l-POST is a special variable that holds form data 33 f-POST transports form data to your script 34 Creating the email message body with PH P 44 Even plain text can be formatted...a little 46 Newlines need double-quoted strings 47 Assemble an email message for Owen 48 Variables store the email pieces and parts 49 Sending an email message with PHP 50 Owen starts getting emails 53 Owen starts losing emails 54
table ; contents connecting to MySOL уУу * j.j How it fits together Knowing how things fit together before you start building is a good idea. You ve created your first PHP script, and it’s working well. But getting your form results in an email isn’t good enough anymore. You need a way to save the results of your form, so you can keep them as long as you need them and retrieve them when you want them. A MySQL database can store your data for safe keeping. But you need to hook up your PHP script to the MySQL database to make it happen. The new report form is great, but now I m getting too many emails. I can t drink enough caffeine to go through them all when I first receive them. Owen’s PHP form works well. Too well... 60 MySQL excels at storing data 61 Owen needs a MySQL database 62 Create a MySQL database and table 64 The INSERT statement in action 67 Use SELECT to get table data 70 Let PHP handle the tedious SQL stuff 73 PHP lets data drive Owen’s w eb form 74 Connect to your database from PHP 76 Insert data with a PHP script 77 Use PHP functions to talk to the database 78 Get connected with mysqli_connectO 80 Build the INSERT query in PHP 85 Query the MySQL database with PHP 86 Close your connection with mysqli-closeO 87 S-POST provides the form data 91 Owen needs help sifting through his data 96 Owen’s on his way to finding Fang 98 XI
table contents create and populette ¿i d utabaše Creating your own data You don’t always have the data you need. Sometimes you have to create the data before you can use it. And sometimes you have to create tables to hold that data. And sometimes you have to create the database that holds the data that you need to create before you can use it. Confused? You won’t be. Get ready to learn how to create databases and tables of your very own. And if that isn’t enough, along the way, you’ll build your very first PHP MySQL application. This is taking too long I d rather be spending my time imitating Elvis, not sending out emails manually. Ú ХІІ The Elvis store is open for business 104 Elmer needs an application 105 Visualize Elmer’s application design 106 It all starts with a table 109 Make contact with the MySQL server 110 Create a database for Elmer’s emails 111 Create a table inside the database 112 We need to define our data 113 Take a meeting with some MySQL data types 114 Create your table with a query 117 USE the database before you use it 120 DESCRIBE reveals the structure of tables 123 Elmer’s ready to store data 125 Create the Add Email script 126 The other side of Elmer’s application 133 The nuts and bolts of the Send Email script 134 First things first, grab the data 135 mysqli_fetch_array() fetches query results 136 Looping for a WHILE 139 Looping through data with while 140 You’ve got mail...from Elmer! 145 Sometimes people want out 146 Removing data with DELETE 147 Use WHERE to DELETE specific data 148 Minimize the risk of accidental deletions 149 MakeMeElvis.com is
a web application 154
table contents realistic and practical applications Your Application on the Web .Հ ·. .1 //f į .j i Sometimes you have to be realistic and rethink your plans. ^ L··zZ j·* or plan more carefully in the first place. When your application s out there on the Web, you may discover that you haven’t planned well enough. Things that you thought would work aren t good enough in the real world. This chapter takes a look at some real-world problems that can occur as you move your application from testing to a live site. Along the way, we’ll show you more important PHP and SQL code. Elmer has some irritated customers 160 MakrMřELVís.coM Protecting Elmer from...Elmer 163 Enter узиг resinare, last nane, Ш eran И be аЗЗеЗ lhe Make Me Elvte manina՝՛։։. Demand good form data 164 The logic behind Send Email validation 165 Your code can make decisions with IF 166 Testing for truth 167 IF checks for more than just equality 168 The logic behind Send Email validation 171 fy ^ fi Make Me Elvi» ՜ *dtl Łwa11. First nane ..ili Lest nane. Õites Email ;j*.։-ŕbrea rec«p.Hs։9· ■ sÜTnrt ՝ fes IMU., LT.’-............՜ Make Me Elvis - Remove Emalt MakeMřELVísxoi Piease беіезі me email saaresse։ to aeiete from me email list ar.g click Remote. Customers]· reroveO. ՛ ՝ Derny BuDSleton aenoySnigntygumcaii.net Irma Wurna і*ег£гііег5аезисіеэпе.сэп PHP functions for verifying variables 172 Test multiple conditions with AND and OR 179 Form users need feedback 183 Ease in and out of PHP as needed 193 Use a flag to avoid duplicate code 194 Code the HTML form only once 195 A form that references itself 199
Point the form action at the script 200 Check to see if the form has been submitted 202 Some users are still disgruntled 206 Table rows should be uniquely identifiable 208 Primary keys enforce uniqueness 210 From checkboxes to customer IDs 215 Loop through an array with foreach 216 ՜ Em·« KresieeeiDenJÍkresieeípOCketsbiz Dor, 0гаоег3г8оег®«етпз-соооег.сэп ՛ Remove xiii
table ? contents Working Wïth dntą stored ïn її les . When a database just isn’t enough /І ~ Don’t believe the hype...about databases, that is. Sure, they ,?% work wonders for storing all kinds of data involving text, but what about binary ІЧ Ns r Іļ data? You know, stuff like JPEG images and PDF documents. Does it really make sense to store all those pictures of your rare guitar pick collection in a database table? Usually not. That kind of data is typically stored in files, and we ll leave it in files. But it s entirely possible to have your virtual cake and eat it too—this chapter reveals that you can use files and databases together to build PHP applications that are awash in binary data. Guitar Wars ֊ [İİIth Stores Administration xiv Virtual guitarists like to compete 224 The proof is in the picture 225 The application needs to store images 226 Planning for image file uploads in Guitar Wars 231 The high score database must be ALTERed 232 How do we get an image from the user? 236 Insert the image filename into the database 238 Find out the name of the uploaded file 239 Where did the uploaded file go? 244 Create a home for uploaded image files 248 Shared data has to be shared 254 Shared script data is required 255 Think of require_once as insert 256 Order is everything with high scores 258 Honoring the top Guitar Warrior 261 Format the top score with HTML and CSS 262 Only small images allowed 267 File validation makes the app more robust 268 Plan for an Admin page 272 Generate score removal links on the Admin page 275 Scripts can communicate with each other 276 Of
GETs and POSTs 278 GET, POST, and high score removal 280 Isolate the high score for deletion 283 Control how much you delete with LIMIT 284
table contents securing your ąpplicudon ^ Assume they’re all out to get you é/ 1֊’քՀ Your parents were right: don’t talk to strangers. f į Jj trust them. If nothing else, don’t give them the keys to your application data, assuming Or at least don’t they ll do the right thing. It’s a cruel world out there, and you can’t count on everyone to be trustworthy. In fact, as a web application developer you have to be part cynic, part conspiracy theorist. Yes, people are generally bad and they’re definitely out to get you! OK, maybe that’s a little extreme, but it’s very important to take security seriously and design your applications so that they’re protected against anyone who might choose to do harm. , Cuitar Wars « High Scoret Administritiorv itar Wars - High Scores Administration * is * list of aJi Guitar Wars high scores. Use this page to remove scores as needed. iScorcherson 2008 05-0 1 20:36:45 389740 ս1ճյճճ » Chevy 200805-01 20:36:07 282470 Rsjtyjvff Paul Janes 2008 05-01 20:38:23 243260 Rcnwį Laintoo Jastorlus Johansson jLívíu 2008-05-01 20:37:40 186580 2008 05 01 20:37:23 127650 Remów 2008 0 5 01 20:37:02 98430 Rcmqyy 2008-C ՜ To View էհ.S pas«, yo« fû|ïlř1 {0 ârw Cuitar Wars on www.guitarwars.net Same Ո The day the music died 296 Where did the high scores go? 297 Securing the teeming hordes 299 Protecting the Guitar Wars Admin page 3 00 HTTP authentication requires headers 302 Header Exposed 304 Take control of headers with PHP 305 Authenticating witli headers 306 Create an Authorize script 314 Guitar Wars Episode II : Attack of the High Score Clones 318
Subtraction by addition 319 Security requires humans 320 Plan for moderation in Guitar Wars 321 Password member thu password ՛ո my чеүеһа.г Canee1 ՝ f Make room for approvals with ALTER 322 Unapproved scores aren’t worthy 327 The million-point hack 330 Everything in moderation...? 331 How exactly did she do it? 333 Tricking MySQL with comments 334 The Add Score form was SQL injected 335 Protect your data from SQL injections 336 A safer INSERT (with parameters) 337 Form validation can never be too smart 339 Cease fire! 341 XV
table or contents building personalized Web apps mw-i*»·֊*։ . „И.֊·* f «·՛ ·/ Г i։ // If О Remember me? No one likes to be forgotten, especially users of web applications. If an application has any sense of “membership,” meaning that users somehow interact with the application in a personal way, then the application needs to remember the users. You’d hate to have to reintroduce yourself to your family every time you walk through the door at home. You don’t have to because they have this wonderful thing called memory. But web applications don’t remember people automatically - it’s up to a savvy web developer to use the tools at their disposal (PHP and MySQL, maybe?) to build personalized web apps that can actually remember users. Mismatch -Where Mismatch · Where opposites attract! Latest members: Semrmber this oastword i- Mismatch · Edit Profile Perseis) Information First name: junan Last name: ncwci They say opposites attract 346 Mismatch is all about personal data 347 Mismatch needs user log-ins 348 Prepping the database for log-ins 351 Constructing a log-in user interface 353 Encrypt passwords with SHA() 354 Comparing passwords 355 Authorizing users with HTTP 358 Logging In Users with HTTP Authentication 361 A form for signing up new users 365 What’s in a cookie? 375 Use cookies with PHP 376 Rethinking the flow of log-ins 379 A cookie-powered log-in 380 Logging out means deleting cookies 385 Sessions aren’t dependent on the client 389 Keeping up with session data 391 Renovate Mismatch with sessions 392 Log out with sessions 393 Mismatch - View Profile Bir .lidate: issi ւ:
Cilj: *։■՛ і Username: .¡nettles First пате; Jotan Sime: са i Last name: Nettles Picture: Cc Dirlhdate: 1981 1 ! -03 Location: Athens, GA V»‘0u№ xvi h *֊C 10 ■ VW ptW -Jiv? Complete the session transformation 398 Users aren’t feeling welcome 404 Sessions are short-lived... 406 ...but cookies can last forever! 407 Sessions + Cookies = Superior log-in persistence 409
table contents elimínate duplícate code Sharing is caring Umbrellas aren’t the only thing that can be shared, in any web application you’re bound to run into situations where the same code is duplicated in more than one place. Not only is this wasteful, but it leads to maintenance headaches since you will inevitably have to make changes, and these changes will have to be carried out in multiple places. The solution is to eliminate duplicate code by sharing it. In other words, you stick the duplicate code in one place, and then just reference that single copy wherever you need it. Eliminating duplicate code results in applications that are more efficient, easier to maintain, and ultimately more robust. Mismatch is in pieces 421 Rebuilding Mismatch from a template 422 Rebuild Mismatch with templates 424 Mismatch is whole again...and much better organized 426 1 be btadrr oi tir,- y appears з{ įh։ Ц /VJismaúh f,igí, ánd displays the appliiafioh fiįle a·. »·■;!! as a page-speel-fi¿ startsession.php header.php МЬлшКҺ· Whnr oppoůtt։ utt™«1· hv ťy Д . .гг.5тС.г. page ir՛ai s personalised to a user requires log-in teát ikai keeps iraek of ike user navmenu.php SfpCívs iur,t kçfow -.eider, ,5rd frondes ijih И; -Г*/ЗТ.£Һ pci h £ Wlį.h « •OrtSItlįovį гу.елѵ to nāVlC.ļt índex.php И/lf.n SO footer.php is ХѴІІ
table contents control your cinta, control your World ։ w ՝4 į Harvesting data There’s nothing like a good fall data harvest. An abundance of information ready to be examined, sorted, compared, combined, and generally made to do whatever it is your killer web app needs it to do. Fulfilling? Yes. But like real harvesting, taking control of data in a MySQL database requires some hard work and a fair amount of expertise. Web users demand more than tired old wilted data that’s dull and unengaging. They want data that enriches...data that fulfills...data that’s relevant. So what are you waiting for? Fire up your MySQL tractor and get to work! Hırt./ f Sidney s dislike howcr » iOVtftS į •įO ^ miSmáí/.h password first name mUmat h_re*| en · response. birthdote ¡¿о—g jd_ţ x category picture xviii Making the perfect mismatch 428 Mismatching is all about the data 429 Model a database with a schema 431 Wire together multiple tables 436 Foreign keys in action 437 Tables can match row for row 438 One row leads to many 439 Matching rows many-to-many 440 Build a Mismatch questionnaire 445 Get responses into the database 446 We can drive a form with data 450 Generate the Mismatch questionnaire form 456 Strive for a bit of normalcy 462 When normalizing, think in atoms 463 Three steps to a normal database 465 Altering the Mismatch database 469 So is Mismatch really normal? 470 A query within a query within a query... 472 Let’s all join hands 473 Connect with dots 474 Surely we can do more with inner joins 475 Nicknames for tables and columns 477 Joins to the rescue 478 Five steps to a
successful mismatch 485 Compare users for “mismatchiness” 487 AH we need is a FOR loop 488
table : contents string and custom fonctions Better living through functions Functions take your applications to a whole new level. You’ve already been using PHP’s built-in functions to accomplish things. Now it’s time to take a look at a few more really useful built-in functions. And then you’ll learn to build your very own custom functions to take you farther than you ever imagined it was possible to go. Well, maybe not to the point of raising laser sharks, but custom functions will streamline your code and make it reusable. Risky Jobs ֊Search □ingerì Your dream job is out there. Oo you have the gut» to go find It? Risky Jobs - Search A good risky job is hard to find 502 Tite search leaves no margin for error 504 SQL queries can be flexible with LIKE 505 Explode a string into individual words 510 implodeO builds a string from substrings 513 Preprocess the search string 519 Replace unwanted search characters 520 The query needs legit search terms 524 Copy non-empty elements to a new array 525 Sometimes you just need part of a string 528 Extract substrings from either end 529 Multiple queries can sort our results 532 Functions let you reuse code 536 Build a query with a custom function 537 Custom functions, how custom are they really? 538 Find your risky job: Risky Jobs · Search Results Ruky Jobs - Search Results Risky Jobs · Search Results SWITCH makes far more decisions than IF 542 Give build_queryO the ability to sort 545 We can paginate our results 548 Get only the rows you need with LIMIT 549 Control page links with LIMIT 550 Keep track of the pagination data 551 Set
up the pagination variables 552 Revise the query for paginated results 553 Generate the page navigation links 554 Putting together the complete Search script 557 The complete Search script, continued... 558 xix
table contents regular expressions Rules for replacement String functions are kind of lovable. But at the same time, they’re limited. Sure, they can tell the length of your string, truncate it, change certain characters to other certain characters. But sometimes you need to break free and tackle more complex text manipulations. This is where regular expressions can help. They can precisely modify strings based on a set of rules rather than a single criterion. I First Name: Jimmy Last Name: Swift I Email: JS@sim-u-duck.com , Phone: 636 4652 Desired Job: Ninja fj i. , s Ա if «ЧІУ Risky Jobs lets users submit resumes 562 Decide svhat your data should look like 566 Formulate a pattern for phone numbers 569 Match patterns with regular expressions 570 Build patterns using metacharacters 572 Fine-tune patterns with character classes 579 Check for patterns with preg_match() 584 Standardize the phone number data 591 Get rid of the unwanted characters 592 Matching email addresses can be tricky 596 Domain suffixes are everywhere 598 Use PHP to check the domain 599 Email validation: putting it all together 600 I got an error and then entered my entire phone number. And then I got a ninja job! First Name: Jimmy Last Name: Swift Email: JS@sim-u-duck.com Phone: (555) 636 4652 Desired Job: Ninja XX ՚Դ fitä ) ԱԱյ
table contents Visualizing your data...and more! Drawing dynamic graphics «гм է՛- Ü U Sure, we all know the power of a good query and a bunch of juicy results. But query results don’t always speak for themselves. Sometimes it’s helpful to cast data in a different light, a more visual light. PHP makes it possible to provide a graphical representation of database data: pie charts, barcharts, Venn diagrams, Rorschach art, you name it. Anything to help users get a grip on the data flowing through your application is game. But not all worthwhile graphics in PHP applications originate in your database. For example, did you know it’s possible to Add score, add score, add score, add score, add score, add score... thwart form-filling spam bots with dynamically generated images? Guitar Wars Reloaded: Rise of the Machines 606 No input form is safe 607 We need to separate man from machine 608 We can defeat automation with automation 611 Generate the CAPTCHA pass-phrase text 613 Visualizing the CAPTCHA image 614 Inside the GD graphics functions 616 Drawing text with a font 620 Generate a random CAPTCHA image 623 Returning sanity to Guitar Wars 625 Add CAPTCHA to the Add Score script 627 Five degrees of opposability 630 Charting mismatchiness 631 Storing bar graph data 632 Reading between the lines with the master of charts 635 From one array to another 636 Build an array of mismatched topics 638 Formulating a bar graphing plan 639 Crunching categories 640 Doing the category math 641 Bar graphing basics 644 Draw and display the bar graph image 647 Individual bar graph images for all 650
Mismatch users are digging the bar graphs 653
table : contents syndication and Web services Interfacing to the world 13r 1 II Zf ί Iťs a big world out there, and one that your web application can’t afford to ignore. Perhaps more importantly, you’d rather the world not ignore your web application. One excellent way to tune the world in to your web application is to make its data available for syndication, which ¿Crespi means users can subscribe to your site’s content instead of having to visit your web site directly to find new info. Not only that, your application can interface to other applications through web services and take advantage of other people’s data to provide a richer experience. xxii Owen needs to get the word out about Fang 658 Push alien abduction data to the people 659 RSS pushes web content to the people 660 RSS is really XML 661 From database to newsreader 666 Visualizing RSS 669 What makes a newsman tick 671 Dynamically generate an RSS feed 672 Link to the RSS feed 676 A video is worth a million words 678 Pulling web content from others 680 Syndicating YouTube videos 681 Make a YouTube video request 682 Owen is ready to build a REST request 686 YouTube speaks XML 690 Deconstruct a YouTube XML response 694 Visualize the XML video data 695 Access XML data with objects 696 From XML elements to PHP objects 697 Drill into XML data with objects 698 Not without a namespace! 699 Fang sightings are on the rise 701 Lay out videos for viewing 702 Format video data for display 703
table contents JeftQVers The Top Ten Topics (we didn’t cover) V 1 f. f Į ֊1 M Even after all that, there’s a bit more. There are just a few more things we think you need to know. We wouldn’t feel right about ignoring them, even though (hey on|y neec| a brief mention. So before you put the book down, take a read through these short but important PHP and MySQL tidbits. Besides, once you’re done here, all that’s left are a couple short appendices... and the index... and maybe some ads... and then you re really done. We promise! # 1. Retrofit this book for PHP4 and mysql functions 714 #2. User permissions in MySQL 716 #3. Error reporting for MySQL 718 #4. Exception handling PHP errors 719 #5. Object-oriented PHP 721 #6. Securing your PHP application 723 #7. Protect your app from cross-site scripting 725 #8. Operator precedence 727 #9. What’s the difference between PHP 5 and PHP 6 728 # 10. Reusing other people’s PHP 730 1 dataville Savings Loan к i.՛ ք=ւ ш C s--------- ------- ՀՅ Г«/ г Ж ΕΞ3 )=Վ 1 xxiii
table of contents set up ą development environment A place to play Cl © чі vi įj Ij You need a place to practice your newfound PHP and MySQL skills without making your data vulnerable on the «i—web. It’s always a good idea to have a safe place to develop your PHP application before unleashing it on the world (wide web). This appendix contains instructions for installing a web server, MySQL, and PHP to give you a safe place to work and practice. Server computer «— » C3 * .... Web server rí ֊Ji і (Database server xxiv Create a PHP development environment 732 Find out what you have 732 Do you have a web server? 733 Do you have PHP? Which version? 733 Do you have MySQL? Which version? 734 Start with the Web Server 735 PHP installation steps 737 Installing MySQL 738 Steps to Install MySQL on Windows 739 Enabling PHP on Mac OS X 742 Steps to Install MySQL on Mac OS X 742 Moving from production to a live site 744 Dump your data (and your tables) 745 Prepare to use your dumped data 745 λΐονε dumped data to the live server 746 Connect to the live server 747
table contents extend your pbp Get even more Yes, you can program with PHP and MySQL and create great Web applications. But you know there must be more to it. And there is. This short appendix will show you how to install the mysqli extension and GD graphics library extension. Then we’ll mention a few more extensions to PHP you might want to get. Because sometimes it’s okay to want more. Extending your PHP 750 And on the Mac... 753 Гм A „.«„I, u „»ił/b ՝/* - 1 , OÍ Pff- XXV
|
any_adam_object | 1 |
author | Beighley, Lynn 19XX- Morrison, Michael |
author_GND | (DE-588)133926443 |
author_facet | Beighley, Lynn 19XX- Morrison, Michael |
author_role | aut aut |
author_sort | Beighley, Lynn 19XX- |
author_variant | l b lb m m mm |
building | Verbundindex |
bvnumber | BV035833694 |
classification_rvk | ST 250 ST 271 |
ctrlnum | (OCoLC)634989349 (DE-599)BVBBV035833694 |
discipline | Informatik |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>02233nam a2200481 c 4500</leader><controlfield tag="001">BV035833694</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20200507 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">091118s2009 ad|| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9780596006303</subfield><subfield code="9">978-0-596-00630-3</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)634989349</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV035833694</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">rakwb</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-M347</subfield><subfield code="a">DE-11</subfield><subfield code="a">DE-739</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 250</subfield><subfield code="0">(DE-625)143626:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 271</subfield><subfield code="0">(DE-625)143639:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Beighley, Lynn</subfield><subfield code="d">19XX-</subfield><subfield code="e">Verfasser</subfield><subfield code="0">(DE-588)133926443</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Head First PHP & MySQL</subfield><subfield code="b">[Discover the secrets behind dynamic, database-driven sites, avoid embarrassing mishaps with web forms, load all the key syntax directly into your brain, hook up your PHP and MySQL code, flex your scripting knowledge with dozens of exercises]</subfield><subfield code="c">Lynn Beighley ; Michael Morrison</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Sebastopol, Calif.</subfield><subfield code="b">O'Reilly</subfield><subfield code="c">2009</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XXXVIII, 774 S.</subfield><subfield code="b">Ill., graph. Darst.</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">O'Reilly's head first series</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">PHP</subfield><subfield code="0">(DE-588)4546126-0</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">PHP 5.3</subfield><subfield code="0">(DE-588)7638375-1</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">MySQL</subfield><subfield code="0">(DE-588)4559381-4</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">MySQL 5.1</subfield><subfield code="0">(DE-588)7574874-5</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">PHP</subfield><subfield code="0">(DE-588)4546126-0</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2="1"><subfield code="a">MySQL</subfield><subfield code="0">(DE-588)4559381-4</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="8">1\p</subfield><subfield code="5">DE-604</subfield></datafield><datafield tag="689" ind1="1" ind2="0"><subfield code="a">PHP 5.3</subfield><subfield code="0">(DE-588)7638375-1</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="1" ind2=" "><subfield code="8">2\p</subfield><subfield code="5">DE-604</subfield></datafield><datafield tag="689" ind1="2" ind2="0"><subfield code="a">MySQL 5.1</subfield><subfield code="0">(DE-588)7574874-5</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="2" ind2=" "><subfield code="8">3\p</subfield><subfield code="5">DE-604</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Morrison, Michael</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">Digitalisierung UB Passau - ADAM Catalogue Enrichment</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=018692174&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-018692174</subfield></datafield><datafield tag="883" ind1="1" ind2=" "><subfield code="8">1\p</subfield><subfield code="a">cgwrk</subfield><subfield code="d">20201028</subfield><subfield code="q">DE-101</subfield><subfield code="u">https://d-nb.info/provenance/plan#cgwrk</subfield></datafield><datafield tag="883" ind1="1" ind2=" "><subfield code="8">2\p</subfield><subfield code="a">cgwrk</subfield><subfield code="d">20201028</subfield><subfield code="q">DE-101</subfield><subfield code="u">https://d-nb.info/provenance/plan#cgwrk</subfield></datafield><datafield tag="883" ind1="1" ind2=" "><subfield code="8">3\p</subfield><subfield code="a">cgwrk</subfield><subfield code="d">20201028</subfield><subfield code="q">DE-101</subfield><subfield code="u">https://d-nb.info/provenance/plan#cgwrk</subfield></datafield></record></collection> |
id | DE-604.BV035833694 |
illustrated | Illustrated |
indexdate | 2024-07-09T22:05:41Z |
institution | BVB |
isbn | 9780596006303 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-018692174 |
oclc_num | 634989349 |
open_access_boolean | |
owner | DE-M347 DE-11 DE-739 |
owner_facet | DE-M347 DE-11 DE-739 |
physical | XXXVIII, 774 S. Ill., graph. Darst. |
publishDate | 2009 |
publishDateSearch | 2009 |
publishDateSort | 2009 |
publisher | O'Reilly |
record_format | marc |
series2 | O'Reilly's head first series |
spelling | Beighley, Lynn 19XX- Verfasser (DE-588)133926443 aut Head First PHP & MySQL [Discover the secrets behind dynamic, database-driven sites, avoid embarrassing mishaps with web forms, load all the key syntax directly into your brain, hook up your PHP and MySQL code, flex your scripting knowledge with dozens of exercises] Lynn Beighley ; Michael Morrison Sebastopol, Calif. O'Reilly 2009 XXXVIII, 774 S. Ill., graph. Darst. txt rdacontent n rdamedia nc rdacarrier O'Reilly's head first series PHP (DE-588)4546126-0 gnd rswk-swf PHP 5.3 (DE-588)7638375-1 gnd rswk-swf MySQL (DE-588)4559381-4 gnd rswk-swf MySQL 5.1 (DE-588)7574874-5 gnd rswk-swf PHP (DE-588)4546126-0 s MySQL (DE-588)4559381-4 s 1\p DE-604 PHP 5.3 (DE-588)7638375-1 s 2\p DE-604 MySQL 5.1 (DE-588)7574874-5 s 3\p DE-604 Morrison, Michael Verfasser aut Digitalisierung UB Passau - ADAM Catalogue Enrichment application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=018692174&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis 1\p cgwrk 20201028 DE-101 https://d-nb.info/provenance/plan#cgwrk 2\p cgwrk 20201028 DE-101 https://d-nb.info/provenance/plan#cgwrk 3\p cgwrk 20201028 DE-101 https://d-nb.info/provenance/plan#cgwrk |
spellingShingle | Beighley, Lynn 19XX- Morrison, Michael Head First PHP & MySQL [Discover the secrets behind dynamic, database-driven sites, avoid embarrassing mishaps with web forms, load all the key syntax directly into your brain, hook up your PHP and MySQL code, flex your scripting knowledge with dozens of exercises] PHP (DE-588)4546126-0 gnd PHP 5.3 (DE-588)7638375-1 gnd MySQL (DE-588)4559381-4 gnd MySQL 5.1 (DE-588)7574874-5 gnd |
subject_GND | (DE-588)4546126-0 (DE-588)7638375-1 (DE-588)4559381-4 (DE-588)7574874-5 |
title | Head First PHP & MySQL [Discover the secrets behind dynamic, database-driven sites, avoid embarrassing mishaps with web forms, load all the key syntax directly into your brain, hook up your PHP and MySQL code, flex your scripting knowledge with dozens of exercises] |
title_auth | Head First PHP & MySQL [Discover the secrets behind dynamic, database-driven sites, avoid embarrassing mishaps with web forms, load all the key syntax directly into your brain, hook up your PHP and MySQL code, flex your scripting knowledge with dozens of exercises] |
title_exact_search | Head First PHP & MySQL [Discover the secrets behind dynamic, database-driven sites, avoid embarrassing mishaps with web forms, load all the key syntax directly into your brain, hook up your PHP and MySQL code, flex your scripting knowledge with dozens of exercises] |
title_full | Head First PHP & MySQL [Discover the secrets behind dynamic, database-driven sites, avoid embarrassing mishaps with web forms, load all the key syntax directly into your brain, hook up your PHP and MySQL code, flex your scripting knowledge with dozens of exercises] Lynn Beighley ; Michael Morrison |
title_fullStr | Head First PHP & MySQL [Discover the secrets behind dynamic, database-driven sites, avoid embarrassing mishaps with web forms, load all the key syntax directly into your brain, hook up your PHP and MySQL code, flex your scripting knowledge with dozens of exercises] Lynn Beighley ; Michael Morrison |
title_full_unstemmed | Head First PHP & MySQL [Discover the secrets behind dynamic, database-driven sites, avoid embarrassing mishaps with web forms, load all the key syntax directly into your brain, hook up your PHP and MySQL code, flex your scripting knowledge with dozens of exercises] Lynn Beighley ; Michael Morrison |
title_short | Head First PHP & MySQL |
title_sort | head first php mysql discover the secrets behind dynamic database driven sites avoid embarrassing mishaps with web forms load all the key syntax directly into your brain hook up your php and mysql code flex your scripting knowledge with dozens of exercises |
title_sub | [Discover the secrets behind dynamic, database-driven sites, avoid embarrassing mishaps with web forms, load all the key syntax directly into your brain, hook up your PHP and MySQL code, flex your scripting knowledge with dozens of exercises] |
topic | PHP (DE-588)4546126-0 gnd PHP 5.3 (DE-588)7638375-1 gnd MySQL (DE-588)4559381-4 gnd MySQL 5.1 (DE-588)7574874-5 gnd |
topic_facet | PHP PHP 5.3 MySQL MySQL 5.1 |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=018692174&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT beighleylynn headfirstphpmysqldiscoverthesecretsbehinddynamicdatabasedrivensitesavoidembarrassingmishapswithwebformsloadallthekeysyntaxdirectlyintoyourbrainhookupyourphpandmysqlcodeflexyourscriptingknowledgewithdozensofexercises AT morrisonmichael headfirstphpmysqldiscoverthesecretsbehinddynamicdatabasedrivensitesavoidembarrassingmishapswithwebformsloadallthekeysyntaxdirectlyintoyourbrainhookupyourphpandmysqlcodeflexyourscriptingknowledgewithdozensofexercises |