PHP Code Samples

Object-Oriented Poll System using PHP

March 27, 2018
Object-oriented programming is used to design, develop and implement many simple as well as complex applications. We have already seen object-oriented features of PHP in a previous tutorial. Let us use object-oriented programming to create PHP poll system.  I have created a poll system to let the user vote for their favorite courses. The user will […]
This tutorial was added to PHP.

Show Image Thumbnail by YouTube Video URL using PHP

February 27, 2018
Thumbnails are used for preview a single or group of media entities in a single explorer window. By showing thumbnails, we can have a shortcut or quick-view to see more voluminous data without navigation. Websites use thumbnails to showcase content in a gallery format. For example, the online shopping cart websites showcase their product gallery with image thumbnails. […]
This tutorial was added to PHP.

Star Rating with PHP and jQuery AJAX

January 22, 2018
Star rating is used to rank pages, articles or posts published to the end user. This will help the user to identify and shortlist quality contents that are highly ranked. In this article, we are going to see how to create a PHP star rating system using jQuery AJAX. This article is an improved version […]
This tutorial was added to PHP.

Extract Content using PHP and Preview like Facebook

December 15, 2017
While sharing URLs, if the client automatically extracts title and image to post it as preview, then that would be nice. In many social media websites like Facebook and LinkedIn we can see that feature. They extract title and meta information on sharing links. In this tutorial, we are going to extract the page title, […]
This tutorial was added to PHP.

PHP Login with OTP Authentication

March 21, 2017
Login with an OTP code is a secure method for the user authentication process. In this method, a one-time password is generated dynamically and sent to the user who attempts login. OTP can be sent to the user’s email or his mobile phone. When the user enters the OTP code then the application will authenticate the […]
This tutorial was added to PHP.

Highlighting Keywords in Search Results with PHP

May 31, 2016
Highlighting keywords in search results will help a user to identify appropriate results easily. In a previous tutorial, we have seen advanced search in PHP. In this example, we are highlighting multiple keywords in search results. We are searching database title and description to check if the keyword has occurred. If match found we highlight those […]
This tutorial was added to PHP.

Advanced Search using PHP

May 30, 2016
Advanced search provides more options to the user to filter and narrow down the search result. Advanced search will be convenient for the end users and a search implementation without advanced option will be useless in many cases. Even Google search has ‘advanced search’ option.  In a previous tutorial, we have seen simple PHP search […]
This tutorial was added to PHP.

PHP Forgot Password Recover Code

March 23, 2016
In this post, we are going to see an example to learn how to recover the forgot password. In this example we have a forgot password form to get the username or email to recover the password. After form submits, we are sending password recovery email to the user. The Password recovery email has a […]
This tutorial was added to PHP.

PHP Login Script with Remember Me

March 23, 2016
This post is outdated. See Secure Remember Me for Login using PHP Session and Cookies for creating a login with Remember Me. In a login script, remember me feature is used to preserve the login name and password entered by the user. And it can be populated in the login form at the time of […]
This tutorial was added to PHP.

PHP MySQL Date Range Search with jQuery DatePicker

February 14, 2016
In this tutorial, we are going to see how to search database records date between two given ranges. It will return the filtered results from the database based on these dates input. In this tutorial, we are using jQuery DatePicker to choose the dates for the search options. These date inputs are used to form […]
This tutorial was added to PHP.

↑ Back to Top