Turn Desktop View Off
by Dinesh Thakur

It is useful to verify that all fields are NULL in MYSQL to query data from a database so they can be treated differently from fields with numeric values ​​or text. NULL indicates an unknown value, which is different from a default value, such as 0 or ' '. You can use the PHP function "is_null" to tell if a returned MYSQL field is NULL or not.

 
by Dinesh Thakur

The word "code" has two meanings in operation of computers. The first one is Number or Symbol that representing another meaning. An example of this type of code is "301", which is a code specified in the HTTP to signify. The 301 redirect is the most effective way for you to change the content of a page or site to another without losing the PageRank of the page and the domain that migration. Discover all you need to know to migrate page or domain without losing position in Google. The other meaning of "code" in computing is "programming code" a "permanent redirection". PHP is a programming language for web pages. You can use the PHP code to create a redirect. Redirection redirect or forwards visitors to a web address to another Web address, usually because the original page changed its address. The user is automatically forwarded to the new page location, and usually do not even notice that the address on the top of the browser has changed.



 
by Dinesh Thakur

In this Tutorial, you will create your first object, which will be an instance of a physical address class. As you will be building your examples using this class, you will want to save it as you progress.

 
by Dinesh Thakur

Object-oriented programming allows you to organize a large project into manageable pieces. In comparison, procedural programming is a set of instructions, step by step, that the computer must follow.



 
by Dinesh Thakur

Object: In computer science a primitive data type is a basic type of data provided by programming language. Some examples of primitive data types in PHP include Booleans, which are a logical data type containing true or false; floating-point numbers, also known as floats, which are numeric data type that have fractional values--examples include 36.2 and -25; integers are a numeric data type that hold a whole number without any fractions--examples include -6 and 42; and strings, which contain a sequence of characters such as "ecomputernotes.com." With that in mind, an object is a complex data structure along with attributes and behaviors.



 
by Dinesh Thakur

As you all know, any PHP script must be surrounded by specific tags. They allow the interpreter to know where in the file is PHP code to execute. On ecomputernotes.com, all presented scripts use the <? Php and ?>; and it is not by chance ...

 
by Dinesh Thakur

A password is an extremely sensitive and given coveted by pirates, irrespective of the application that uses it. When the password becomes known to a third person, then the latter can for example take ownership of rights in an application and compromise its normal operation.

 
by Dinesh Thakur

In most professional developments, it is necessary to know proper structure of their application in order to facilitate its design and maintenance. The "design patterns", is one of the best solutions to this problem. With the new model object-oriented PHP 5 similar to that of Java, the implementation of design patterns is facilitated. This tutorial focuses on the presentation and implementation of the Singleton pattern, especially used in web applications.



 
by Dinesh Thakur

The conditional structure "foreach" when you allowed to browse the contents of a table. With version 5 of PHP, you can now browse an entire object to retrieve its properties.

 
by Dinesh Thakur

The exception mechanism was introduced in version PHP 5 in addition to its new object-oriented model. Just as in Java, C ++, ActionScript 3, or Visual Basic (to name only these programming languages), exceptions to simplify, personalize and organize the management "errors" in a computer program. Here the word "errors" does not mean "bug", which is an abnormal behavior of the developed application, but "exceptional cases" to treat differently in the program sequence. Let us therefore how the exceptions.



 
by Dinesh Thakur

PHP integrates another concept of object-oriented programming: abstract classes. This course defines and introduces the concept of abstract classes. We will present what abstract classes, what they are used for development and how to declare and use them. Finally, we will study the particular case of final classes and methods involved in the security of the code object oriented programming.

 
by Dinesh Thakur

We studied in previous articles the magiques__clone () methods, __set (), __get () and __call (). PHP adds to recent two additional magic methods __sleep () and __wakeup () that allow overloading the native process of serialization and de-serialization of PHP data. That's what we'll explain in tutorial with some concrete examples and easy to understand.

 
by Dinesh Thakur

PHP since version 5 implements magic methods you can implement in your classes, which will be automatically called by your script. Magic method __clone () is one of these methods. The following tutorial introduces the operation of the magic method __clone () based on simple and concrete examples.

 
by Dinesh Thakur

PHP has made a big step forward in object-oriented programming with version 5. Since this version, it allows to implement methods in predefined behavior by PHP. These methods are called "magic methods" __call () is one of them.

 
by Dinesh Thakur

PHP has made a big step forward in object-oriented programming with version 5. Since this version, it allows to implement methods in predefined behavior by PHP. These methods are called "magic methods", the __set () and __get () are included.

 
by Dinesh Thakur

The visibility of the properties and methods of an object is one of the basic features of object-oriented programming. This tutorial aims to introduce different levels of visibility offered by the object model PHP 5. We will review them one by one through practical examples and we will bring some good practices to adopt when used.

 
by Dinesh Thakur

Object-oriented programming (OOP) was integrated into the PHP version 3 in 1998, including basic class and object supportIn 2000, PHP4 added some functionality, but suffered from its non-intuitive handling of references with objects handled like value types.

Finally, in 2004, PHP5 included an extensive rewrite of object handling with the introduction of Zend Engine 2, featuring a comprehensive feature set and increased performance.

But at that time, the PHP object model was far too brief. We could really talk about object oriented programming. PHP Developers are then examined the issue and improved the object model that, since version 5, has nothing to envy to other objects languages like Java or C++.



 
by Dinesh Thakur

PHP can manipulate the images for many years and for applying special effects to it, we were often forced to write many lines of code. Since PHP version 5, a new feature has appeared: "imagefilter" to achieve effects with the same quality as designs software.

 
by Dinesh Thakur

The vast majority of dynamic websites or applications need to reuse parts of identical code in several places of the same page, or in several different pages. This is the case for example libraries of user functions or configuration files. Rather than rewrite each time the code, there are functions (actually language constructs) that can import and execute the code reuse in the page. These are the include () and require ().

 
by Dinesh Thakur

Since PHP4, we hear a lot about sessions. Many people using PHP still unaware what they are and what they are for. Others, however, do not know how to use it wisely. This tutorial is an approach to theoretical and practical sessions. They will be presented by means of a simple example throughout this course. This is a space site secured by authentication.

 
by Dinesh Thakur

Cookies are small files that can be written by a PHP script or other languages, such as JavaScript, on the visitor's computer. The cookie mechanism was invented by Netscape in the bearing purposes to some HTTP protocol weaknesses but also to extend the possibilities of relationship between the client and the website. Their function is storage, for a given period, of information relating to the user (his nickname, his last login date, age, preferences ...).



 
by Dinesh Thakur

That says "dynamic website" generally called "forms" and therefore treatment of these. PHP was invented especially for this type of task and that is what we will discuss in this new tutorial. We will learn to use the forms via the superglobal arrays $ _GET and $ _POST. We will also determine the difference in the use of each of them.

 
by Dinesh Thakur

As in most programming languages, it is possible to create your own PHP functions that complement the native functions. This allows performing particular operations that are redundant in the application, and solve a problem by breaking it into several small problems and solutions.

 
by Dinesh Thakur

This tutorial follows the one on conditional statements. The loops are a trivial principle of computing that any developer must master. They are, too, some of the control structures. PHP 4 into account, each with its specific characteristics: for (), while (), do-while () and foreach ().

 
by Dinesh Thakur

This chapter presents two important principles to assimilate: the condititions and loops. This first concept is especially important since it allows to perform a series of actions depending on the conditions being tested. As for the second, it allows to repeat N times a series of actions, and in very short time (at human scale). The advantage of the arrival of the computer is to make life easier for users performing tasks that they can not fulfill. If you ask a person to count from 0 up to 1000, it will take several minutes while a computer will process this transaction in milliseconds (or even a few nanoseconds as its computing power). Then immediately understand the benefits of computing.



 
by Dinesh Thakur

There are 12 types of operators in PHP. We will review them using summary tables. Let's start by arithmetic operators.

 
by Dinesh Thakur

PHP provides structured data types that are more commonly called "tables". What do they do exactly? How do we handle?



 
by Dinesh Thakur

Among the most important concepts of the programming is the concept of variable. Like any language, PHP handles data. For a dynamic site, these data are variables. In addition, they may be of different types, such as text string, as you have used the echo statement in the form of whole or decimal numbers or as true or false boolean values (TRUE or FALSE). These basic types are the most used, but there are others who may be compounds types, such as arrays and objects, or specific types, as resource or NULL. . We will see that the variable part of the mechanisms which make a dynamic application. Let's get into the thick of it.

 
by Dinesh Thakur

In programming, PHP allows you to define constants, it is often necessary to define data structures whose value must not change during program execution. These data structures are typically what is known constants. The most famous mathematical constants is for instance the PI number whose value is approximately 3.1415926535898. Note that PHP natively integrates the M_PI constant. This can then be used for any calculation of circumference.

 
by Dinesh Thakur

Comments are only intended for the programmer. They will not be displayed or executed. They identify as part of the program without interfering in the program. Comments are among the trivial elements in the success of a program; and this is why it is important to use them with intelligence.

 
by Dinesh Thakur

As you all know, any PHP script must be surrounded by specific tags. These reserves allow the interpreter to know where in the file is PHP code to execute. On ecomputernotes.com, all presented scripts use the <? Php and?>; and it is not by chance ...

 
by Dinesh Thakur

In previous tutorials on working environments, we have shown that PHP is a dynamic scripting language interpreted and precompiled server side. It is now for us to achieve our first programs and run them on the web server (local or remote).

 
by Dinesh Thakur

In order to work with PHP, we must ensure that the prerequisites necessary for the implementation of programs. In the development context of web  applications, a web server with PHP is mandatory. The MAMP software (short for Macintosh, Apache, MySQL and PHP) will launch a local web server on a machine  running on the Mac OS X. It is a software for brand users with apple and which contains the following free components: Apache (server daemon), PHP5, MySQL  (DBMS, SQLite (DBMS), and PHPMyAdmin SQLiteManage (administration tools BDD).



 
by Dinesh Thakur

License

PHP is first an interpreted scripting language (actually precompiled opcodes), free, open source and distributed under a license authorizing the modification and redistribution.

 
by Dinesh Thakur

PHP was invented by Rasmus Lerdorf in 1994 for his own use (posting his resume in this case). Formerly abbreviation for Personal Home Page now become Hypertext Preprocessor, PHP is becoming a standard in the world of web programming with its performance, reliability, flexibility and speed.