Determine the PHP version on your server In this lesson, we are going to learn how to determine the PHP version running on our server using codes. Just follow these simple steps: Open any text editor (notepad, notepad ++, etc.).…
Tag: scripting language
PHP Tutorials Compilation
PHP Tutorials Compilation Here are the list of our PHP Lessons and Tutorials Introduction to PHP scripting language PHP Tutorial – Learning the PHP Syntax PHP Tutorial – PHP Basic Data types PHP Variables PHP String Variable PHP if statement…
PHP-MySQL Lesson – Create Table
Creating a Table In this lesson we are going to write a PHP script that will create a table in our MySQL database. To create a table in MySQL, use the command CREATE TABLE tablename. In PHP,mysql_query() function is used to execute…
PHP-MySQL Lesson – Connecting to MySQL database
Connecting to MySQL database In order to access and manage records in a database, we need first to establish a connection to the database. To connect to the MySQL database we are going to use the mysql_connect() function. Here is…
PHP Tutorial – PHP Forms
In this tutorial we are going to learn how to take data entered by the user in an HTML form and process it into PHP script and display the output. We need two pages here namely the process.php and the…
PHP Tutorial – PHP Function
PHP Tutorial – PHP Function In this lesson we are going to learn how to create a function in PHP. A function is a block of codes that performs a particular task which can be executed anywhere in the page…
PHP Tutorial – PHP Arrays
PHP Tutorial – PHP Arrays An array is a special variable that can store multiple values in a single variable. The elements of the array are accessed via an index number, with the first element starting at zero. An array…
PHP Tutorial – for loop
The for loop The for loop is used to execute a set of statements for a certain number of times. Syntax: for (init; condition; increment/decrement) { code to be executed; } Components of for loop: init: set a counter variable…
PHP Tutorial – do while loop
The do while loop In do while loop the statements or conditions are executed first then that condition is evaluated, the loop will continue while the condition is true. Syntax: do { code to be executed; } while (condition); Example:…
PHP if…else…if statement
PHP if…else…if statement if…elseif….else statement – use this statement to select one of several blocks of code to be executed. The if…elseif….else statement This statement is used to select one of several blocks of code to be executed. The if..else…