Category Archives: PHP

Creating a Database using PHP

Creating Database PHP allows the use of mysql_query function to create a database. But in order to create and delete a database, you must have admin rights on the database. This function takes two parameters to create a database. Syntax bool mysql_query (sql, connection); Where, SQL is the query with which you will create the database. Connection (optional)… Read More »


Well, PHP has support for almost every database like oracle, Sybase but developers mostly prefer MySQL database over others. Before starting with the programming we need to have some pre-requisite for the database part. You should have downloaded the compatible version of MySQL for your PHP. Create a database that will store your PHP data and connect with… Read More »

PHP – Date and Time

PHP allows you to use many date functions along with many modifiers that help you to perform some operations on a date. You can even manipulate date using PHP date and time functions. Use of time() function If you want all the information about the current date and time, then PHP helps you with time() function. This function… Read More »

PHP-Regular Expression

A regular expression can be considered as the sequence of characters that allows you to use the PHP functionality of pattern matching. Regular expression helps you to search for a particular string, replace one string from another string. PHP supports two types of regular expressions on which you can perform different functions. POSIX regular expression PERL style regular… Read More »

PHP – Coding Standards

In any programming language, it is important that we follow a particular standard or protocol. This allows different developers or coders to remain on the same page as their peer developers. It makes the code understandable and manageable. There are many reasons that influence developers to stick to these standards. Following the same coding standard allows your team… Read More »

PHP – File Uploading

You can upload a file to the server by using a PHP script with HTML forms. Before uploading the file to the original destination it gets uploaded to a temporary directory by a PHP script. The temporary directory information is mentioned in the phpinfo.php page which is specified as upload_tmp_dir. You can mention the maximum size for the… Read More »