An array is a variable, which can hold multiple values in it. Take it as a cupboard with multiple compartments within it. The cupboard has compartments, and each compartment holds something.
The main difference between the multidimensional array and indexed/associative array is that the indexed and associative arrays hold single element for each index or key. While, the multidimensional array holds an array for each index.
Conditional statements in PHP allows you to match two or more values. Hence, it is also easier to match username and password with the ones you have stored.
In order to create a contact form on your website, with its content delivered to your mailbox, you will first need to make sure PHP's mail() function is enabled. Contact your webhosting company if it is not enabled.
While both count() and sizeof() are similar, but sizeof() often works differently in other programming languages, while count() is commonly used by almost everyone.
A loop is used to perform an action multiple times, until a condition is met.
Ever wanted to create a single header, navigation links, or footer for your website and use it on every page? This also allows editing only 1 file, and the changes are updated across the website.
The combination of alpha-numeric letters, words, and sentences are strings. We have been using it in PHP, in variables, in fetching them from databases, and even from remote pages.
When parsing data from one page to another, you use HTML Forms. There are 2 ways you can send data from page1 to page2. The GET method and the POST method.
Arithmetic operators are the basic part of any programming language where calculation of anything is needed at any level.
While the arithmetic operators help you with calculations, comparison operators help you in comparing 2 or more variables or values. They help you check conditional statements, and loop through series of repetitive operations.
To understand conditional statements and how forms work, it is best to implement it in practical real world examples.
PHP is a server-side scripting language used for coding web pages. PHP stands for PHP: Hypertext Preprocessor.
PHP has over 1000 built-in functions, designed to do many things. But sometimes you require to do few set of operations in same order multiple times. Custom functions come to rescue in this situation.
Ever wanted to create seo friendly urls for your pages, just like WordPress does with its %postname% permalinks?
Apart from displaying a simple clock, Date and Time functions in PHP are also helpful when you are creating time sensitive data. For instance, each entry in your database has time attached to it. Having it will enable you to go forward and backward, and display records that fall between your desired time period.
Session in PHP is used to store data within a browser. It is best for temporarily storing user's login details or website preferences.
MySQL is the most common database been used with PHP. Whether you are looking to store small chunk of data, or build a large application with millions of records, MySQL has been a reliable choice for many years.
In part 1 of our tutorial, we learned how to create a database, create table, and close the database connection. We also learned about several methods for communication with MySQL database.
We already discuss creation of database in part 1, and adding data and reading it in part 2. Now moving forward, we will see how we can modify the data which is already stored in database. We will also see how we can delete the data from tables.