Skip to main content

PHP Tutorial

How to Create Secure Login Page in PHP/MySQL Part I

In our previous tutorial we discuss on how to create a secure registration page using three different approaches. They are: mysql: How to Create Secure Registration Page in PHP/MySQL Part I mysqli: How to Create Secure Registration Page in PHP/MySQL Part II PDO: How to Create Secure Registration Page in PHP/MySQL Part III This time we will create a secure login script based on our previous

How to Create Secure Registration Page in PHP/MySQL Part III

In our last two articles, we discuss on how to create a registration page using mysql and mysqli extension and how to secure it using mysql_real_escape_string or mysqli_real_escape_string. This time we will modify our code to use PDO instead of mysql or mysqli extension. Before we begin, let’s give some few advantages of using PDO in favor of mysqli. Portability – supports 12 different drivers

How to Create Secure Registration Page in PHP/MySQL Part II

mysqli extension works differently compared to mysql extension. The 'i' stands for improved. Which means that it has some features that cannot be found in mysql extension. There are two approach in using mysqli extension. They are Object Oriented style and Procedural style. If you are migrating your old PHP file to mysqli extension, I prefer you use the procedural style. It's very easy to convert

How to Create Secure Registration Page in PHP/MySQL Part I

By secured we mean that we need to sanitize the data that is passed to our script in order to secure the registration of new account or user. There are three different types of connectivity in MySQL. They are: mysql = old MySQL function mysqli = improved MySQL function pdo = using prepared statement Mysql_connect is currently not supported in PHP version 5.5.0. So the option left are mysqli and

PHP easter_days()

PHP easter_days() easter_days() function returns the number of days after March 21, on which Easter falls for a specified year. Syntax of this function: easter_days(year,method) year - defines the year to calculate the midnight on Easter from. If the year parameter is omitted, the current year is used. (optional) method - allows you to calculate Easter dates based on other calendars. E.g. it uses

How to Convert Julian Day into a Specified Calendar in PHP

PHP cal_from_jd() The cal_from_jd() function converts the specified Julian day into a date of the specified calendar. Syntax of this function: cal_from_jd(jd,calendar) jd - A number (a Julian day count). (required) calendar - specifies the calendar to use. (required) The following calendar values can be used: CAL_GREGORIAN CAL_JULIAN CAL_JEWISH CAL_FRENCH Example It shows the basic use of this

Creating and Populating table with MySQL Data using Twitter Bootstrap framework

In this tutorial, I’m going to discuss how to use the Twitter Bootstrap to create a table and populate this table with records from MySQL database using PHP. Using Bootstrap framework, you can save more time when working with different browsers and or devices. And Bootstrap contains HTML and CSS based design templates that you can use this to improve the quality of your web application. First you

How to create a Sign up Page Using Twitter Bootstrap

In this tutorial, I'm going to show you how to create a Sign up page using the twitter bootstrap framework. Using bootstrap framework, it has a ready made piece of code and you can save time because it easy to use, fast and better. If you don’t have this framework yet, you can download it here. After downloading, create a new folder and name it as “signup”. Then save this to our local server. Then

Social Networking Site: Improving of Login System using Advance PHP

In this tutorial, we will focus on how to improve our PHP code in more dynamic ways using Object Oriented Programming. To start with this application, open first our web directories then look for the index.php file and make a copy of it, and name the old “index.php” into” index_basic.php”. Then inside the includes folder, look for the “member.php” and open it because we’re going to add another

Creating a Registration Page Part I

In this tutorial, I will show you how create our Registration Page using Bootstrap framework. The Registration form together with the Login form will welcome you when you access the site. And it will require the new member to register on the site, so that they can login and to have access to the site. First, create a PHP file named “index.php”, save it inside “philsocial” folder. And this PHP file