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

random_headers

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"
[/sourcecode]

2. Display Your Most Recent Twitter Status Using PHP

twitter1

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

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

php_colors

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

subscribe

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

php-ajax

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

php_short_url

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

dynamic-_thumbnamils

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

password

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

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

check_user_name

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

google_here

15. PHP components: Autosuggest

suggest

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

16. Easy PDF Generation in PHP

pdf

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

backup

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

rss_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

visitor

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

20. PHP Redirect Page

redirect

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: http://www.new-url.com" );
?>
[/sourcecode]

Source

21. CSS-PHP Variable

css_variable

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

22. Create a Countdown Using PHP

countdown

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

Demo

23.Simple PHP/MySQL Pagination

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

hex_rgb

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

25. Create a Simple Guestbook Using PHP

guestbook

26. Creating Tag Cloud using PHP, MySQL and CSS

tag-cloud

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

27. Creating an Image Gallery with PHP

hover_box

Demo

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

poll

Demo

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

calendar

Demo

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

php_cheat

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


Author:

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.


  • http://www.evanessencia.co.cc Lysianthus

    Amazing tutorials! :D Thanks for compiling & posting!

  • tania

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

  • purencool

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

  • moytri barman

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

  • http://www.snapixel.com Buy Stock Photos

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

    Keep up the good work.

  • http://jlhaslip.com Jim Haslip

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

  • http://www.carronmedia.com Ian Harris

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

    Thanks again.

  • Kawsar Ali

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

  • http://jlhaslip.com Jim Haslip

    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.

  • stephen

    great reference

  • Kawsar Ali

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

  • chris

    the link for the creation of a rss feed doesnt work