20 Useful PHP Components & Tutorials for Everyday Project

March 2nd, 2009

Web applications have made huge leaps and bounds in improving user experience thanks to a lot of recently developed Ajax technology. When you combine some neat functionality courtesy of PHP with the cleverness of javascript you can produce some pretty cool results. In an effort to help you take it up a notch, we’d like to share some methods for helping your site anticipate a user’s next move.

The list below is made up of the best 20 FREE PHP Components and Tutorials that you will likely need in many of your projects, they are all of the highest quality and more or less easy to configure. Give them a try.

1. Charts

pChart is a PHP class oriented framework designed to create aliased charts. Most of todays chart libraries have a cost, our project is intended to be free. Data can be retrieved from SQL queries, CSV files, or manually provided. This project is still under development and new features or fix are made every week. Focus has been put on rendering quality introducing an aliasing algorithm to draw eye candy graphics. Rendering speed has been dramatically enhanced since the first version, we’ll still continue optimising the code!

2. PHP components: Autosuggest

PHP component ready to use to implement a search form with an autosuggest feature using PHP and MySQL.

3. Animated Ajax Record Deletion Using MooTools

If you are a huge fan of WordPress’ method of individual article deletion where you click the delete link, the menu item animates red, and the item disappears. Here’s how to achieve that functionality with MooTools javascript.

	$query = 'DELETE FROM my_table WHERE item_id = '.(int)$_GET['delete'];
	$result = mysql_query($result,$link);

4. Sanitize and Validate Data with PHP Filters

Data validation is an integral part of working with forms. Not only can invalid submitted data lead to security problems, but it can also break your webpage. In this tutorial we’ll take a look at how to remove illegal characters and validate data by using the “filter_var” function.

5. How to Build a Login System for a Simple Website

In this tutorial you will learn how to build a login system with PHP and MYSQL. Many, many features will be covered; including MySqli, Prepared Statements, jQuery, Classes, Sessions, Cookies, etc.

6. Building Your First Simple CMS

In this tutorial you will learn how to create a simple PHP class that will:

  • Create a database
  • Connect to a database
  • Display a form with two fields
  • Save the form data in the database
  • Display the saved data from the database

7. HOW-TO: Reddit-style Voting With PHP, MySQL And jQuery

If you are a regular at Reddit, you must have noticed the way people vote there. You can either vote up or vote down. Pretty interesting, huh? This tutorial will show you how to create such a voting system with jQuery, PHP and MySQL.

Check out the demo here

8. Easy Pagination with PHP and Mootools

This is a PHP Page class that handles the database queries, generating ajax page navigation and even creates the Javascript for you.

Check out the demo here

9. Caching Dynamic PHP pages easily

Looking for a solution to cache heavy pages and just serve a static html version for a little while now, and here is a solution in output buffering.

Check out the demo here

10. Directory trees with php and jquery

A simple way to keep track of many files is to use a directory tree. A directory tree lists out files and directories so that it’s easy to find what you’re looking for. In this tutorial, we will create a directory tree using PHP and jQuery.

Check out the demo here

11. jQuery – PHP & Ajax with the Twitter API

Learn how you can use jQuery, PHP and a little ajax to connect up to the Twitter API and return results. When you load your HTML it will call the javascript function getSearch() to return Twitter Search API results every 30 seconds.

12. How to Make a Password Strength Meter Like Google

Password strength meters are becoming more and more popular amongst web services. Google uses one when creating a Google account. Here is how to create one yourself.

Check out the demo here

13. Backup Your Database into an XML File Using PHP

Backing up data is extremely important. Most of the time the database is the most important piece of the puzzle. Imagine losing all of the data in your database — it would be tragic. Here’s a PHP snippet that outputs your database as XML. Here is how the output will look like.

<database name="my_database">
	<table name="noupe_comments">
			<column name="comment_ID" blob="0" maxlength="" multiple_key="0" not_null="1" numeric="1" primary_key="1" table="noupe_comments" type="int" default="" unique_key="0" unsigned="1" zerofill="0" />
			<column name="comment_post_ID" blob="0" maxlength="" multiple_key="1" not_null="1" numeric="1" primary_key="0" table="noupe_comments" type="int" default="" unique_key="0" unsigned="0" zerofill="0" />

Check out the demo here

14. Add Custom Google Search Results to Your Site with PHP

Learn how to integrate a custom google search results on your site, and style it to your liking.

15. Send Hassle Free and Dependable HTML Emails With PHP

A simple straightforward function that sends HTML e-mails with a plain text counterpart for those over 80 and still using AOL 2.5.

16. How to Validate Forms in both sides using PHP and jQuery

In this tutorial we are going to learn how to validate your forms using PHP and jQuery in both sides: client side (using javascript with jQuery) and server side (using PHP). It will be interesting to see how to use regular expressions to validate different kind of e-mails, passwords and more.

Check out the demo here

17. Create a shoutbox using PHP and AJAX (with jQuery)

how to create a dynamic ajax based shoutbox with jQuery from scratch. It will be very interesting to know how to use the ajax function of jQuery and how it can be used to insert and recover data from a MySQL database via PHP in a way asynchronous.

Check out the demo here

18. 3 ways to compress CSS files using PHP

When you’re using a sophisticated design, CSS files can quickly become very long, and takes time to load. Here are 3 interresting ways of compressing CSS files by using PHP.

19. Smart Image Resizer

The major advantage of this script is that it allows you to resize and crop any image on my website without touching the actual image or writing any code.

20. PHP Contact Form Script

This contact form will return a validation message if the message was sent succesfully. It will also display an error message if you try to send an empty message or if the e-mail is invalid.

Check out the demo here

21. PHP & jQuery image upload and crop v1.2

This PHP script will allow you to upload a JPG image, resize it if required then crop it to given height and width.

The jungle is alive: Be it a collaboration between two or more authors or an article by an author not contributing regularly. In these cases you find the Noupe Editorial Team as the ones who made it. Guest authors get their own little bio boxes below the article, so watch out for these.

Tags: ,

77 comments for „20 Useful PHP Components & Tutorials for Everyday Project
  1. ericb on March 2nd, 2009 at 2:49 pm

    WOW this is really an amazing post! I’m a complete beginner on PHP/MySQL these tutorials would really help a lot. Thanks for sharing!

  2. Danno on March 3rd, 2009 at 12:09 am

    Hope to see some of these come out as WordPress plugins. Good list.

  3. Stephen on March 3rd, 2009 at 4:46 am

    For charting, I have found that LibChart ( is much simpler to use.

    Thanks for the list

  4. covax on March 3rd, 2009 at 4:52 am


  5. covax on March 3rd, 2009 at 4:59 am

    Hope to see some of these come out as WordPress plugins. Good list.

  6. Fabryz on March 3rd, 2009 at 5:05 am

    Nice collection :D

    This night this page had a weird layout

  7. Bijal on March 3rd, 2009 at 7:08 am

    thanks man..
    it’s superb..

  8. zoel on March 3rd, 2009 at 8:32 am

    very – very superb! if u never bookmark this page, you will be lose ;-)

  9. Jeromy on March 3rd, 2009 at 1:38 pm

    Very detailed and well laid out, as per usual.

    Now if my little brain could only apply your info, I would be set:) I must admit, without any post secondary training in any component of web design, it is tuff to learn on my own. Is there a tool for writing php? i.e. there are plenty of html editors (so one doesn’t need to know everything about html).

    Thanks Noupe!

    Jeromy (aka hillbilly)

    • Joseph on March 3rd, 2009 at 2:44 pm

      Eclipse w/PDT or Zend IDE

    • Daniel on March 4th, 2009 at 3:50 pm

      You can use a lot of editors for php. Lightweight is Programmers Notepad [free] and Kommodo [has ftp functionality embedded]. Btw great-post post beginers.

  10. Janckos on March 3rd, 2009 at 2:18 pm

    Excelente recopilacion, gracias!.

  11. Jamp Mark on March 3rd, 2009 at 5:40 pm

    Very useful indeed. One can create a login UI with validations, strength meter and using mysql with this list.

  12. Permana Jayanta on March 4th, 2009 at 1:52 am

    Great .. very useful … thanks for making this list

  13. Diego on March 4th, 2009 at 3:39 am

    Algunas cosas muy interesantes

  14. avanzaweb on March 4th, 2009 at 5:29 am

    I have to probe all these solutions.

  15. Sarah on March 4th, 2009 at 9:05 am


  16. Vincent Franco on March 4th, 2009 at 10:35 am

    Excellent list, especially the dynamic image resizer!

  17. Sklep W?dkarski Zoologiczny on March 4th, 2009 at 1:35 pm

    Awesome post! But one thing is missing – some newsletters scripts.

  18. Sklep W?dkarski Zoologiczny on March 4th, 2009 at 1:39 pm

    Awesome post! But one thing is missing – some newsletters scripts.

  19. Derrick on March 4th, 2009 at 1:55 pm

    Wrong link posted on the last example.

  20. Mani on March 4th, 2009 at 10:20 pm


    I have been following your posts for long and have found them really great.

    Thank you.

  21. Tom Norris on March 5th, 2009 at 12:11 am

    This is a very cool list, but a lot of people still use plain text for e-mail. Ever try to load a huge mail from tickcetmaster, livenation, or jinx on a cell phone? :)

  22. Eligio on March 5th, 2009 at 1:11 am

    Great tutorial, like to see the ajax image/upload crop on wordpress. This will be an awesome plugin!!

  23. ebookey on March 5th, 2009 at 2:03 pm

    Great list, well worth bookmarking for the future. Thanks!

  24. DarkLight on March 6th, 2009 at 10:29 am

    Really nice post, thanks!

  25. superstoker on March 6th, 2009 at 12:28 pm

    great post

  26. sky on March 8th, 2009 at 6:12 am

    wow..this is very useful for me..
    thank u..

  27. ranga on March 8th, 2009 at 7:17 am

    cool links . thanks !!

  28. inetis on March 8th, 2009 at 1:12 pm

    Thanks for this great list

  29. Amir on March 9th, 2009 at 1:19 am

    Thanks for such a useful list, this gonna very helpful to me…

  30. ambshah on March 9th, 2009 at 4:32 am

    better be careful with what you use, on online business that has commercial transactions enabled needs to be outsourced to a professional , of course that’s just my opinion. you can always create your wish list using these resources for your developer…

  31. Mark on March 9th, 2009 at 5:12 am

    Great Job, I see at least 3 I will be using in the near future.

  32. Krystian on March 9th, 2009 at 12:09 pm

    Thanks for password strength meter solution. Very usefull.

  33. ChristopherJacob on March 9th, 2009 at 12:35 pm

    Seriously useful stuff here.

  34. Kestutis on March 10th, 2009 at 6:18 am

    Appears to me that the pChart project is dead. The frequent updates that were are no more. And the charts themselves are pretty bugged (added pChart to my project, and bit sorry about it.)

  35. Amber Weinberg on March 10th, 2009 at 10:07 am

    great links, i really like that email validation :)

  36. zohaib on March 10th, 2009 at 10:28 am

    Reddit style voting is quite good

  37. Brendon on March 10th, 2009 at 1:48 pm

    I guess $result = mysql_query($result,$link) is supposed to be $result = mysql_query($query,$link), right?

  38. PHP Programmer on March 11th, 2009 at 8:04 am

    Great Post Thanks

  39. Randy on March 11th, 2009 at 6:40 pm

    I am learning php now and have been wondering how so much of what is listed is done! Glad I stumbled here! Thanks!

  40. LANDLORDBUILDING on March 12th, 2009 at 12:41 pm

    hope I could learn this..

  41. SPEEDUPYOURINTERNET on March 12th, 2009 at 12:45 pm

    can anybody teach me how to do this..?

  42. Patternhead on March 13th, 2009 at 8:48 am

    Great resource. Thanks

  43. Dip on March 19th, 2009 at 6:35 am

    This is very useful article to jazz up the skill in PHP language. We also wrote a few posts that gives in depth idea about PhP. Please, feel free to take a look of the above Blog URL and have your feedback.
    Thank you,

  44. ZAQINET on March 24th, 2009 at 1:58 am


  45. Th3luva on March 24th, 2009 at 11:55 pm

    When I open this site..Whoah! It’s really good for beginner like me..keep up a good work guys. Thanks for every posts.

  46. mo7amed on March 28th, 2009 at 5:45 am

    this is wonderful tutorial .. i read it 3 times and get a fantastic results and sure i put a
    copy of this lesson on my site here

  47. andai on March 29th, 2009 at 7:52 pm

    These are some great tutorials… thanks!

  48. shadi jordan on March 30th, 2009 at 2:54 pm

    thanks for all this ..
    right and usefull

  49. Benny Han on April 1st, 2009 at 1:40 am

    Great list. Thank you!

  50. Conrad on April 1st, 2009 at 11:39 pm

    Great post thanks

  51. CD on April 26th, 2009 at 8:52 am

    The title says 20 tutorials, but there are 21 tutorials :)

  52. ebu on November 6th, 2009 at 11:57 am

    i don’t care what is the tutorial is that …but one person she got comments is soo cute…whatever..

  53. Cazpa on December 6th, 2009 at 1:29 pm

    Great list, number 7 is what I was looking for :))

  54. recursos humanos peru on February 23rd, 2010 at 7:02 pm

    Good scripts, will serve much, thanks to me!

  55. Chris Roane on March 11th, 2010 at 8:43 am

    Great links! I am bookmarking this for later.

    Thanks for posting this.

  56. Wayne Rooney on May 10th, 2010 at 4:48 am

    I hope Wayne Rooney makes it back to full fitness before the World Cup – we’ll be lost without him :(

  57. Bright on May 21st, 2010 at 12:12 pm

    Thanks a lot .u r really a life saver….

  58. Ovais on July 21st, 2010 at 12:54 am

    I was looking for a php tutorial for a long time and ultimately i got it..its really easy to understand,,thanks a lot for sharing..

  59. Robindra Singha on September 27th, 2010 at 9:05 pm

    This is really good collection.. everything topics is very useful thanks guys.. keep it up..

  60. howtogetsixpacks on October 8th, 2010 at 1:13 pm

    Wonderful write-up! Finally somebody who knows how it’s information on which enables it to supply exellent content to us viewers.Definitely eager for your next exercising write-up.Kenneth

  61. Little Geek on November 1st, 2010 at 11:55 am

    OK! i must say these are really good examples of useful handy php snippets. i have collected some snippets, it might be handy for others too. here is the link : i am thinking of using some of your snippets as a new post in my blog.

  62. prabhakaran on November 27th, 2010 at 11:25 am

    Amazing post. Thanks for the share :)

  63. Sarah Tailor on January 11th, 2011 at 9:06 pm

    WOW – This really is all I want for my Projects and to make them quickly and smartly then ever before…

    By the way – I have just started using PHP and it’s just been a couple of months, so guess my excitement.

    Thanks :D

  64. Sang Fellows on January 16th, 2011 at 2:13 pm

    i’m not too good at html, i need to find a good shoutbox maker

    • Tanmoy on May 27th, 2011 at 2:41 pm

      When you aren’t good in HTML, you should try to be an expert on that before playing with PHP/MySQL

  65. ???? on January 18th, 2011 at 10:13 am

    I personally believe there is a ability to writing articles that only a few posses and frankly you have it , you genius!2$

  66. lik654 on February 24th, 2011 at 11:17 am

    Great web site! I am realy happy stumbling upon it!

  67. Anthony on April 1st, 2011 at 3:42 am

    Hi this is a Nice collection Thanks i am trying to add the password meter that you have here to my website but the link is not working can you help me with a working link please……

  68. Tanmoy on May 27th, 2011 at 2:40 pm

    Definitely important for each level of developers.

  69. John S on June 27th, 2011 at 9:45 am

    great list thanks!

    I found this PHP class pretty useful recently too.

    Powerful form validation that was easy to implement in my app

  70. shrikant on July 13th, 2011 at 8:00 am

    really good post..

  71. sajib on April 13th, 2012 at 5:03 pm

    it’s a great and great site for PHP programmers…
    I like it soooooooo much.

  72. kishan on May 1st, 2012 at 4:41 pm

    Great post keep posting bro………

  73. TJ TIsdale on June 4th, 2012 at 3:03 am

    Thank you. I have been looking for something like this! Wonderful

  74. sudheer on January 22nd, 2013 at 10:42 am

    more information in this site … keep bookmark it >>>