PHP Programming for Beginners. Key Programming Concepts. How to use PHP with MySQL and Oracle databases (MySqli, PDO)
Sergey D Skudaev
In this book, you will find practical solutions that can be used for your own website.The book includes instructions for installation of Apache, PHP, MySQL, and Oracle and provides many tips for using MySQL and the Oracle database. The code examples include access to MySQL using PDO; access to Oracle using OCI and PDO; Oracle stored procedures, and PHP code to execute Oracle stored procedures.The complete responsive website source code is included in responsive_website. zip as a free bonus.
PHP Programming for Beginners
Key Programming Concepts. How to use PHP with MySQL and Oracle databases (MySqli, PDO)
Sergey D Skudaev
© Sergey D Skudaev, 2018
ISBNВ 978-5-4490-9015-7
Created with Ridero smart publishing system
Introduction
DISCLAIMER
The information presented inВ this eBook is sold without warranty either expressed or implied. The author will hold no liability for any damages caused either directly or indirectly byВ the instructions contained inВ this book, or byВ the software products recommended for installation and usage.
Who Should Read This Book?
Those who wish toВ learn computer programming inВ PHP should be familiar with HTML, as aВ knowledge ofВ HTML will be helpful inВ your efforts. This book is also for those who know other programming languages and wish toВ learn PHP as well.
PHP is aВ server-side scripting language executed on aВ web server, sending HTML pages toВ the browser. Included inВ the following are instructions for the installation ofВ Apache Web Server, PHP, MySQL database, and phpMyAdmin script used for MySQL database administration. And please note that all ofВ the above-mentioned software can be readily obtained and used free ofВ charge.
Programming inВ any computer language or script is not as impossible as one might think.
Perhaps you’re thinking that being very good at math is a prerequisite to becoming a computer programmer, however, this is not necessarily so. The average person can master computer programming. In fact, a study revealed that, among immigrants, former musicians tended to make good programmers, probably because writing music is much like writing code.
InВ aВ sense, programming is like packaging something because programming language deals with variables that are used toВ hold different pieces ofВ data. What is aВ variable? Think ofВ aВ variable as you would aВ box for packaging. When you select aВ box, you must consider the size and nature ofВ the item (s) being packaged.
Numbers, text strings, and objects are what comprise aВ computer program. AВ variable might contain whole numbers, fractions, or pieces or strings ofВ text. AВ variable that contains aВ whole number is called an integer. AВ variable holding aВ number with aВ decimal point is called aВ float or double, while aВ variable holding aВ piece ofВ text is called aВ string.
Computer programs begin with aВ variable declaration and, with some exceptions, the data type. For example, inВ C++ or Java, you must declare the variable name and exact data type. AВ variable name, inВ any computer language, must be only one word. It may contain alphabetical characters, numbers, and underscores. Often programmers use prefixes toВ show variable data types. For example, strName for aВ string data type or int_Account for an integer data type, and soВ on.
The integer, double, string, and date are all data types. Each data type requires a different “space” in the computer memory. For example, an integer occupies four bytes, or, because there are 8 bits to a byte, 32 bits – a bit being the smallest unit of information. A bit may contain a 0 or a 1. In the binary system 00000001 equals 1, 00000010 equals 2, 11111111 equals 256, or 2 to the 8th power.
Four bytes can hold numbers from -2,147,483,648В toВ +2,147,483,647.
AВ Double occupies 8В bytes. Huge num