PHP/MySQL Tutorial Part 1

I started using PHP with MySQL a few years ago.  I found that the world of PHP has no limit at all!  You can pretty much do anything you want.

And because it is so large, people start telling me “I bought a book because I want to learn PHP.  But I just have no clue of where to start.”. 

The most important feature that PHP provides is its robustness when it comes to interacting with the database.  And yet, this is always the most desirable feature used getting to web programming.

Hence I am writing this tutorial.  I am sure you can find millions of similar tutorials on the internet.  But well, doesn’t hurt to have another one.

First of all, what sites would need a database?

  • Forums
  • Blogs
  • Shopping sites
  • Banners

After all, these sites only do a few actions – add information, read information, edit information, and delete information to or from the database.  Hence my conclusion is: you need to learn how to add/read/edit/delete to start with.

Anything else needed?  Yes, and I have listed them below:

  • A Linux server with Apache installed, OR
  • A linux hosting account.  You can get one cheaply with a domain name here.  Obviously this is the easier option.
  • A computer with notepad or any other text editor.  However, do not use Word to edit codes.  It is going to give you a lot of headache if you do.  If you are going to program a complete website with proper layout etc, I would recommend Macromedia Adobe Dreamweaver.
  • A file transfer program like WS_FTP or Filezilla. 

Are you sure you have everything ready?  Go on and test it by placing this code into an empty file:

<?php
phpinfo();
?>

Save the file as phpinfo.php.  Try to access this page with a browser – if things go well, you would see a page with the information of the server.  And you have already written your first line of PHP code!

Tags:

This entry was posted on Friday, December 19th, 2008 at 1:03 am and is filed under PHP MySQL. You can follow any responses to this entry through the RSS 2.0 feed. Responses are currently closed, but you can trackback from your own site.

Comments are closed.