Nowadays you hardly ever hear PHP mentioned without MySQL close behind.
Why?
Well, PHP and MySQL make a great pair for web application development efforts.
MySQL is often used in conjunction with PHP for the same reasons PHP is so popular - it is free, widely available, and most web hosts have it installed.
There are other database systems that PHP works with, but MySQL seems to be the most common.
In this section, I’ll familiarize you with using MySQL to connect to a MySQL database and perform the basics.
Advanced MySQL and it’s SQL language is a little beyond the scope of this tutorial, so we won’t dive very far in to heavy details.
However, MySQL’s commands are written in almost-plain-english, and you can usually figure it out just by looking at it.
Most other PHP/MySQL books also tell you how to install MySQL and configure it.
We’re not going to do that here.
Your web host most likely has MySQL available for you, and they have simple ways to create databases.
The two hosts that I have been using for years are bluehost and Hostgator.
Both make it very easy to set up a database, and they provide the information you need to connect to it with.
More on MySQL in the next post...
0 Comments
In this section, we covered some more advanced features of PHP. What is one thing almost everyone wants to do with their website? You are hopefully familiar with Cookies - you get them almost anytime you visit a website. When your websites start to become more advanced and you find that you have a need for specific user data to be available throughout different pages on your website (think shopping cart!), it’s time for Sessions! It feels like everything in PHP is a function, yes? What if you want to loop through an Associative Array?
The FOR LOOP is very similar to a WHILE LOOP. The Creamy Bagel Company wants to show a pricing matrix on their website for up to a 20 bagel pack. But, since bagels are a valuable commodity, the price fluctuates regularly. Note on PHP Math functions We all have mundane, repetitive tasks we have to do. |
David Rentson
If this free PHP and MYSQL Tutorial is helpful for you... Great! Archives
October 2008
Categories
All
|