Learning PHP, MySQL, and JavaScript (Animal Guide) and over one million other books are available for Amazon Kindle . Learn more


or
Sign in to turn on 1-Click ordering.
or
Amazon Prime free trial required. Sign up when you check out. Learn more
More Buying Choices
Have one to sell? Sell yours here
or
Get a £9.25 Amazon.co.uk Gift Card
Learning PHP, MySQL, and JavaScript: A Step-by-Step Guide to Creating Dynamic Websites
 
 
Start reading Learning PHP, MySQL, and JavaScript (Animal Guide) on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Learning PHP, MySQL, and JavaScript: A Step-by-Step Guide to Creating Dynamic Websites [Paperback]

Robin Nixon
4.7 out of 5 stars  See all reviews (28 customer reviews)
RRP: £30.99
Price: £20.14 & this item Delivered FREE in the UK with Super Saver Delivery. See details and conditions
You Save: £10.85 (35%)
  Special Offers Available
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In stock.
Dispatched from and sold by Amazon.co.uk. Gift-wrap available.
Want guaranteed delivery by Friday, June 1? Choose Express delivery at checkout. See Details
‹  Return to Product Overview

Product Description

Review

A worthy effort to introduce the programming and database neophyte into the world of dynamic website design. --millionchimpanzees.blogspot.com, September 2009

A great introduction to the technologies at the basis of the Web. You will both enjoy this book and learn from it.
--Pascal Borghino, Database Architect for Yahoo! Inc

Product Description

If you know HTML, this guide will have you building interactive websites quickly. You'll learn how to create responsive, data-driven websites with PHP, MySQL, and JavaScript, regardless of whether you already know how to program. Discover how the powerful combination of PHP and MySQL provides an easy way to build modern websites complete with dynamic data and user interaction. You'll also learn how to add JavaScript to create rich Internet applications and websites.

Learning PHP, MySQL, and JavaScript explains each technology separately, shows you how to combine them, and introduces valuable web programming concepts, including objects, XHTML, cookies, and session management. You'll practice what you've learned with review questions in each chapter, and find a sample social networking platform built with the elements introduced in this book.

This book will help you:

  • Understand PHP essentials and the basics of object-oriented programming
  • Master MySQL, from database structure to complex queries
  • Create web pages with PHP and MySQL by integrating forms and other HTML features
  • Learn about JavaScript, from functions and event handling to accessing the Document Object Model
  • Use libraries and packages, including the Smarty web template system, PEAR program repository, and the Yahoo! User Interface Library
  • Make Ajax calls and turn your website into a highly dynamic environment
  • Upload and manipulate files and images, validate user input, and secure your applications

From the Author

Having developed for the Internet since the mid 1990s I have used a number of programming languages, beginning with Perl, which was the first tool I mastered. However I soon found that great though Perl was for developing with, at the time it didn't have the power I needed for ultra busy websites, and so the load averages of the servers I used was going through the roof.

So I rewrote all the processor-intensive code in C and was able to substantially slow down our server acquisition rate. But while C is powerful, it takes a lot of coding to replicate even basic Perl functions. So when PHP came along I was very pleasantly surprised to discover that even though it is interpreted (that is, re-compiled each time it is run), it placed far less of a strain on the servers than Perl, and also took up far less development time.

Since then I have used PHP in combination with MySQL for all my server side development. And with JavaScript gaining the XMLHttpRequest object, and hence the beginnings of Ajax, the three technologies are now my mainstays for web development.

So when O'Reilly asked me to write this book I jumped at the opportunity. In it I have tried to take you from first steps, without assuming any prior knowledge other than basic HTML and maybe some CSS, through each of the technologies in turn, and along the way point out the shortcuts and pitfalls I have discovered, to give you the headstart I didn't have.

I maintain an active discussion forum on the book's topics, which is linked to via the companion website at lpmj.net, and am always happy to answer any questions you may have.

From the Back Cover

Learn how to create responsive, data-driven websites with the three central technologies of PHP, MySQL, & JavaScript--whether or not you know how to program. This simple, streamlined guide explains how the powerful combination of PHP and MySQL provides a painless way to build modern websites with dynamic data and user interaction. You'll also learn how to add JavaScript to create rich Internet websites and applications, and how to use Ajax to handle background communication with a web server.

This book explains each technology separately, shows you how to combine them, and introduces valuable concepts in modern web programming, including objects, XHTML, cookies, regular expressions and session management. Learning PHP, MySQL, & JavaScript will help you:

* Understand the essentials of PHP and the basics of object-oriented programming
* Master MySQL, from database structure to complex queries
* Create interactive web pages with PHP and MySQL by integrating forms and other HTML features
* Get a thorough grounding in JavaScript, from functions and event handling to accessing the Document Object Model
* Use libraries and packages such as the Smarty web template system, The PEAR program repository and the Yahoo! User Interface Library (YUI)
* Learn how to make Ajax calls and turn your website into a highly dynamic environment
* Find out how to upload and manipulate files and images, validate user input and secure your applications against being hacked
* Develop best practices for error handling, user authentication and website usability

Programming tips and exercises in each chapter will help you practice what you've learned. If you have a graphics or web design background and know your way around HTML, this book will have you building interactive websites quickly.

Robin Nixon is computer journalist who has also developed numerous websites using PHP, MySQL and JavaScript. He has written over 500 articles and authored three books on computing.

About the Author

Robin Nixon has worked with and written about computers since the early 1980s (his first computer was a Tandy TRS 80 Model 1 with a massive 4KB of RAM!). One of the web sites he developed presented the world's first radio station licensed by the music copyright holders. In order to enable people to continue to surf while listening, Robin also developed the first known pop-up windows. He has also worked full time for one of Britain's main IT magazine publishers, where he held several roles including editorial, promotions, and cover disc editing.

Excerpt. © Reprinted by permission. All rights reserved.

Chapter 1

The World Wide Web is a constantly evolving network that has already traveled far beyond its conception in the early 1990s, when it was created to solve a specific problem. State-of-the-art experiments at CERN (the European Laboratory for Particle Physics--now best known as the operator of the Large Hadron Collider) were producing incredible amounts of data--so much that the data was proving unwieldy to distribute to the participating scientists who were spread out across the world.

At this time, the Internet was already in place, with several hundred thousand computers connected to it, so Tim Berners-Lee (a CERN fellow) devised a method of navigating between them using a hyperlinking framework, which came to be known as Hyper Text Transfer Protocol, or HTTP.

He also created a markup language called HTML, or Hyper Text Markup Language. To bring these together, he wrote the first web browser and web server, tools that we now take for granted.

But back then, the concept was revolutionary. The most connectivity so far experienced by at-home modem users was dialing up and connecting to a bulletin board that was hosted by a single computer, where you could communicate and swap data only with other users of that service.

Consequently, you needed to be a member of many bulletin board systems in order to effectively communicate electronically with your colleagues and friends.

But Berners-Lee changed all that with one fell swoop, and by the mid 1990s, there were three major graphical web browsers competing for the attention of five million users.

It soon became obvious, though, that something was missing. Yes, pages of text and graphics with hyperlinks to take you to other pages was a brilliant concept, but the results didn't reflect the instantaneous potential of computers and the Internet to meet the particular needs of each user with dynamically changing content. Using the Web was a very dry and plain experience, even if we did now have scrolling text and animated GIFs!

Shopping carts, search engines, and social networks have clearly altered how we use the Web. In this chapter, we'll take a brief look at the various components that make up the Web, and the software that helps make it a rich and dynamic experience.

HTTP and HTML: Berners-Lee's Basics

HTTP is a communication standard governing the requests and responses that take place between the browser running on the end user's computer and the Web server. The server's job is to accept a request from the client and attempt to reply to it in a meaningful way, usually by serving up a requested web page--that's why the term server is used.

The natural counterpart to a server is a client, so that term is applied both to the web browser and the computer on which it's running.

Between the client and the server there can be several other devices, such as routers, proxies, gateways, and so on. They serve different roles in ensuring that the requests and responses are correctly transferred between the client and server. Typically, they use the Internet to send this information.

A web server can usually handle multiple simultaneous connections and--when not communicating with a client--spends its time listening for an incoming connection. When one arrives, the server sends back a response to confirm its receipt.

The Request/Response Procedure

At its most basic level, the request/response process consists of a web browser asking the web server to send it a web page and the server sending back the page. The browser then takes care of displaying the page

The Benefits of PHP, MySQL, and JavaScript

At the start of this chapter, I introduced the world of Web 1.0, but it wasn't long before the rush was on to create Web 1.1, with the development of such browser enhancements as Java, JavaScript, JScript (Microsoft's slight variant of JavaScript) and ActiveX.

On the server side, progress was being made on the Common Gateway Interface (CGI) using scripting languages such as Perl (an alternative to the PHP language) and server0side scripting--inserting the contents of one file (or the output of a system call) into another one dynamically.

Once the dust had settled, three main technologies stood heads and shoulders above the others. Although Perl was still a popular scripting language with a strong following, PHP's simplicity and built-in links to the MySQL database program had earned it more than double the number of users. And JavaScript, which had become an essential part of the equation for dynamically manipulating CSS (Cascading Style Sheets) now took on the even more muscular task of handling the client side of the Ajax process.

Under Ajax, web pages perform data handling and send requests to web servers in the background--without the web user being aware that this is going on.

No doubt the symbiotic nature of PHP and MySQL helped propel them both forward, but what attracted developers to them in the first place?

The simple answer has to be the ease with which you can use them to quickly create dynamic elements on websites. MySQL is a fast and powerful, yet easy-to-use database system that offers just about anything a website would need in order to find and serve up data to browsers.

When PHP allies with MySQL to store and retrieve this data, you have the fundamental parts required for the development of social networking sites and the beginnings of Web 2.0.

‹  Return to Product Overview

Amazon.co.uk Privacy Statement Amazon.co.uk Delivery Information Amazon.co.uk Returns & Exchanges