PHP Tutorial

Server Side Form Validation (Registration Form)

Submitted by GeePee on
Validating a form using a JavaScript gives convenience to your visitors by avoiding page reload and other features that we discuss on our previous tutorial called Validate Login Page Using JavaScript. But validating a form using JavaScript alone is not safe. One reason is if the JavaScript is not enabled in the web browser.

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

Submitted by GeePee on

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.

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

Submitted by GeePee on
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 it to mysqli this way. Looking at the example in our previous tutorial.

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

Submitted by GeePee on
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.

PHP easter_days()

Submitted by alpha_luna on

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 the Gregorian calendar during the years 1582 - 1752 when set to CAL_EASTER_ROMAN.

How to Convert Julian Day into a Specified Calendar in PHP

Submitted by alpha_luna on

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

Creating and Populating table with MySQL Data using Twitter Bootstrap framework

Submitted by GeePee on
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.

How to create a Sign up Page Using Twitter Bootstrap

Submitted by GeePee on
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.