Essential PHP Techniques for Web Designer and Developers

If you’re a web designer or developer pretty sure you know or heard about PHP. Just as a refresher, PHP is a server-side HTML embedded scripting language, which designed for producing dynamic web pages. It generally runs on a web server, taking PHP code as its input and creating web pages as output . Some PHP script requires general knowledge or Math and logic. In this post, you will find 30 PHP tutorial and techniques that are not too complex and different. You can easily learn these techniques and implement them for your next project.

1. Random Header Image


Using this simple PHP code you can have Random headers for you HTML website and WordPress site too. If you are using wordpress just paste the code inside your header.php file. This is the easiest way there is . You can also check out this alternate method

[sourcecode language=”html”]
<img src="http://path_to_images/header_<!–?php echo(rand(1,5)); ?–>.jpg"

2. Display Your Most Recent Twitter Status Using PHP


Showing your latest tweet is the new Web Trend. If you want show your latest post use this the following  code to show your most recent latest tweet.

You can this wordpress plugin to acquire the same functionality

3. PHP Random Quote


If your some one enjoys nice quotes you use these code display  your favorite quotes on your site

4. Generate Random Number for Giveaway

If you are giving away prizes on your site, need a random generator for to pick a winner you can  use this technique to create your own script. . Here is live demo of the script working.

5. CSS Colors: Take Control Using PHP


This article describes how to separate presentation and content by referring to colors using abstract names such as base and highlight,automatically generate a color gradient from a single base color, automatically adjust the contrast of foreground colors so they can viewed on top of your background colors.

6. Display your RSS feed count in plain text


Would you like to show how many Subscribers you have like Naldzgraphic does?This tutorial will show you how to display your Feedburner feed count as a plain text.

7. PHP and AJAX – Make a Password Strength Bar that Updates in Real-time


8. Using PHP and MySQL to Create a Short URL  Service


If you thought you need be a genius to create a URL Shortener Service think again. This tutorial will show you how create your own URL Shorten site.

9. How to Dynamically Create Thumbnails


In this screencast you will learn how to upload files and then have PHP dynamically create a thumbnail.

10. PHP Mini Message Board Tutorial

Php Message Board

Follow this tutorial and you’ll learn how to create a mini message board in PHP and MySQL.

11. Random Password Generation


Some website offers  random password generation when you register. This tutorial will walk you through a script that generates a random password to a given length and you can create your own too.

12. Creating simple PHP contact form


When you need user send feedback to your email you can usecontact form. In this tutorial you’ll learn how to create contact form with php script. If you are looking for something already made you can use this form.

13.Check Username Availability Using Ajax and PHP Using Jquery’s Fading Effect


In this post, you can learn how to make a fancy username availability checking in ajax and php using jquery

14. Be Notified When Google Crawls Your Site Using PHP


15. PHP components: Autosuggest


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

16. Easy PDF Generation in PHP


Ever wanted to generate PDF files in your web application? You could let your users download pages in PDF format, generate PDF reports to be distributed in your organisation, or just get better control over how your pages look when printed. In this tutorial, we’ll work through building a simple page and saving it as a PDF file.

17. Using PHP to Backup MySQL Databases


Backing up your database is really important . I have not use get started with the help of this tutorial.

18. How to Create an RSS Feed for Your Site in PHP


If your site is not run by CMS and you don’t want to burn your feed,  Create your own feed without hassle. This tutorial explains is detail on how to create your own feed.

19. Display How Many Visitors Online Using PHP


This tutorial simply explains how to simply show how many users are online on your site.

20. PHP Redirect Page


Lets say you moved your site to a new domain and you don’t want to lose your readers. Simple redirect the visitors using the following code.

[sourcecode language=”php”]
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location:" );


21. CSS-PHP Variable


This technique allows you to use css variables just like other variables in many other languages.

22. Create a Countdown Using PHP


Are you lunching a new a site or have an event ? Create a simple  Coundown clock using PHP Technique.


23.Simple PHP/MySQL Pagination


What if you have a table with a thousand rows, and you want to allow the user to browse through the entire table.

24.Convert RGB from/to HTML hex color


This post explains how to create a HEX to RGB and vice versa script.

25. Create a Simple Guestbook Using PHP


26. Creating Tag Cloud using PHP, MySQL and CSS


This tutorial will show you how to create your own tag cloud for your website.

27. Creating an Image Gallery with PHP



This tutorial focus on the PHP sccript that enhances features the  original CSS Hoverbox. This PHP script  fills the Hoverbox by reading the Image filenames from the Image folder and inserting them into the HTML.

If you are looking for even simpler PHP image gallery  this tutorial show how to create a really simple gallery Using PHP

28. Simple Poll using PHP and MySQL



Forgot about installing a script, just get simple feedback from your readers, roll out your own Poll using this tutorial. You can also look at W3’s Ajax and PHP Poll

29. Create a Calendar Using PHP



Do you need show a calendar on your site? This tutorial will show you how to render a calendar for the current month using PHP and HTML.

30. PHP Cheat Sheet


This is not a tutorial,but It is something necessary for every web designer and developer. Download this PHP Cheat sheet you will saving yourself a lot time when working on project.

If you are interested in more..

  1. PHP Tutorial for Beginners
  2. Advacned PHP Tutorial
  3. Learn PHP

Lead image credit


Kawsar Ali is a web designer who also likes blogging. In his spare time he walks around with a Nikon D5100 hunting for good textures.

12 Responses

  1. Lysianthus says:

    Amazing tutorials! :D Thanks for compiling & posting!

  2. tania says:

    Wow! Amazing a fresh collection you got here. Thank you.

  3. purencool says:

    These tools are very useful. Especially PDF converter it has so many uses and saves so much time and effort.

  4. moytri barman says:

    a website will show only current month’s posted articles (those were posted by user) among other months using php code

  5. Very well written post however, I would recommend that you turn the No Follow off in your comment section.

    Keep up the good work.

  6. Jim Haslip says:

    using the strikeout isn’t exactly working there, bucko.

  7. Ian Harris says:

    Thanks for including my site in your list!! It’s a great reference you have put together there.

    Thanks again.

  8. Kawsar Ali says:

    @Jim Haslip I am not taking credit for any scripts Just linking to site. I will take out the demo link .

  9. Jim Haslip says:

    I like that Hoverbox. Any chance you will be hosting your own Demo? The links from this page are killing my Bandwidth needlessly.
    And please give credit for the script to the copyright holders. Thanks.

  10. stephen says:

    great reference

  11. Kawsar Ali says:

    @chris: Sorry about that. It is fixed. Thanks

  12. chris says:

    the link for the creation of a rss feed doesnt work