PHP Tutorial

  • Submitted by: 
    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...
  • Submitted by: 
    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...
  • Submitted by: 
    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...
  • Submitted by: 
    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...
  • Submitted by: 
    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...
  • Submitted by: 
    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...
  • Submitted by: 
    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...
  • Submitted by: 
    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...
  • Submitted by: 
    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...
  • Submitted by: 
    In this tutorial, I’m going to show you how upload files from a client web broswser to a web server. To do this we need to configure first our PHP for file uploads. Open php.ini then make sure to set the following: • file_uploads – must be set to (“on” or set to “true” or “1”) so that the php will accept file upload • upload_tm_dir – is where we’re going to upload file temporarily, and it uses...

Pages