Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
AJAX and PHP: Building Responsive Web Applications

You're reading from   AJAX and PHP: Building Responsive Web Applications Enhance the user experience of your PHP website using AJAX with this practical tutorial featuring detailed case studies

Arrow left icon
Product type Paperback
Published in Mar 2006
Publisher Packt
ISBN-13 9781904811824
Length 284 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (17) Chapters Close

AJAX and PHP
Credits
About the Authors
About the Reviewers
Preface
1. AJAX and the Future of Web Applications FREE CHAPTER 2. Client-Side Techniques with Smarter JavaScript 3. Server-Side Techniqueswith PHP and MySQL 4. AJAX Form Validation 5. AJAX Chat 6. AJAX Suggest and Autocomplete 7. AJAX Real-Time Charting with SVG 8. AJAX Grid 9. AJAX RSS Reader 10. AJAX Drag and Drop Preparing Your Working Environment Index

Preparing the AJAX Database


As an exercise for both using phpMyAdmin and working with MySQL, let’s create a database called ajax, and create a MySQL user with full privileges to this database. You’ll use this database and this user for all the exercises in this book. Follow these steps:

  1. Load http://localhost/phpMyAdmin in your web browser. If the configuration data you wrote in config.inc.php was correct, you should see something like this:

    Figure A.5: phpMyAdmin in Action

  2. Write ajax in the Create a new database box, and then click the Create button.

  3. phpMyAdmin doesn’t have the visual tools to create new users, so you’ll need to write some SQL code now. You need to create a user with full access to the ajax database, which will be used in all the case studies throughout the book. This user will be called (surprise!) ajaxuser, and its password will be practical. To add this user, click the SQL tab at the top of the page, and write this code in it:

    GRANT ALL PRIVILEGES ON ajax.* 
    TO ajaxuser@localhost IDENTIFIED BY “practical”

    Note

    SQL does sound a bit like plain English, but a few things need to be mentioned. The * in ajax.* means all objects in the ajax database. So this command tells MySQL “give all possible privileges to the ajax database to a user of this local machine called ajaxuser, whose password is practical”.

  4. Click the Go button.

  5. Congratulations, you’re all set for your journey through this book. Have fun learning AJAX!

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image