Default Syntax
- Styles of PHP Tags
- Comments in PHP
- Output functions in PHP
- Datatypes in PHP
- Configuration Settings
- Error Types
Variables in PHP
- Variable Declarations
- Variable Scope
- PHP’s Superglobal Variables
- Variable Variables
Constants in PHP
- Magic Constants
- Standard Pre-defined Constants
- Core Pre-defined Languages
- User-defined Constants
Control Structures
- Execution Control Statements
- Conditional Statements
- Looping Statements with Real-time Examples
Functions
- Creating Functions
- Passing Arguments by Value and Reference
- Recursive Functions
Arrays
Regular Expressions
- Validating text boxes,emails,phone number,etc
- Creating custom regular expressions
Object-Oriented Programming in PHP
- Classes, Objects, Fields, Properties, _set(), Constants, Methods
- Encapsulation
- Inheritance and types
- Polymorphism
- Constructor and Destructor
- Static Class Members, Instance of Keyword, Helper Functions
- Object Cloning and Copy
- Reflections
PHP with MySQL
- Integration with MySQL
- MySQL functions
- Gmail Data Grid options
- SQL Injection
- Uploading and downloading images in Database
- Registration and Login forms with validations
Strings and Regular Expressions
- Declarations styles of String Variables
- Heredoc style
- String Functions
- Regular Expression Stntax(POSIX)
- PHP’s Regular Expression Functions(POSIX Extended)
Working with the Files and Operating System
- File Functions
- Open, Create and Delete files
- Create Directories and Manipulate them
- Information about Hard Disk
- Directory Functions
- Calculating File, Directory and Disk Sizes
Error and Exception Handling
- Error Logging
- Configuration Directives
- PHP’s Exception Class
- Throw New Exception
- Custom Exceptions
Authentication
- HTTP Authentication
- PHP Authentication
- Authentication Methodologies
Cookies & sessions
- Types of Cookies
- How to Create and Access Cookies
- Session Variables
- Creating and Destroying a Session
- Retrieving and Setting the Session ID
- Encoding and Decoding Session Data
- Auto-Login
- Recently Viewed Document Index
Web Services
- RSS Syntax
- SOAP
- How to Access Web Services
XML Integration
- Create a XML file from PHP with Database records
- Reading Information from XML File
MySQL Concepts
- Storage Engines
- Functions
- Operators
- Constraints
- DDL commands
- DML Commands
- DCL Command
- TCL Commands
- Views
- Joins
- Cursors
- Indexing
- Stored Procedures
- Mysql with PHP Programming
- Mysql with Sqlserver(Optional)
PHP Global variables:
Get & Post methods:
data can be sent to Body no one can see the data. (secure and mostly used).
$_POST[]: both post and get variables extracts the form fields into variables and values
$_GET[]: used send data via URL or http header. (security issues anyone can see the data)
$_REQUEST[]: it accepts both get and post method in form fields.
<form method=”POST” action=”action.php” name=return false validate()/>
Name: input type=”text” name=”name”/>
email: input type=”text” name=”email”/>
Mobile: Input type=”text” name=”mobile” />
Password: input tyepe=”text” name=”password”/>
<input type=”submit” value=”display text” />
</form>
in the above Name values (name,email,mobile,passwords) treats as Variables. and user entered inputs are treats as values.
this can be extracted by extract(S_Post[form])
Onclick form we hae set return false to validate details by cilentside scripts like js,jquery etc
server-side validation:
isset(): to know it contains value or not
empty() to check variable null or not.
Query strings: also known as “?”, using this we can pass keys and values via URL. using get method.
Connecting database
$dbconnection= Mysqli_connect(“localhost or remote”,”dbuser”,”password or empty”, “databasename”)
// Checking connection
if (!dbconnection) {
die(“Notconnect ” . mysqli_connect_error()); //here conactinating stings with mysql error fucntion to display errors.
}
mysqli_select_db(“databasename”)
- Warning: mysqli_select_db() expects exactly 2 parameters, 1 given
Error mysqli_select_db() should have 2 parameters, the connection link and the database name –
mysqli_select_db($dbconnection, ‘databaename‘) or die(mysqli_error($con));
Mysqli_query
- error :Warning: mysqli_query() expects at least 2 parameters, 1 given
$query = mysqli_query($dbconnection, “SQL query“);
Mysqli vs MySQL_connect”
mysqli is improved version of MySQL available from PHP 7. MySQL extension works up to PHP 5.6.
INSET query:
“Inset into table name (column1, column2, column3,) values (val1, val2, val3)”;
Arrays:
Associative array: in the form keys and value
ex: $form = array(“name”=>”alebert”, “email”=>”g@gmail.com”, “mobile”=>”000000000”);
Index array: $values = array(“1”, “2”, “3”);
$values[0] = “1”;
$values[1] = “2”;
$values[2] = “3”;
Multidimensional array:
WordPress & Php 7 compatibility and issues
Please Upgrade php5.6 to PHP 7.1 which uses less ram and faster performance.
RAM consume different 40MB with PHP 5.6 and php7.xx using 4-10GB ram hard. all themes and WordPress core also compatible with PHP 7 upgrade and save resources billing. also, give better speed for the user.
diffrence among =, ===, and ===.
x = 1 //x now equals 1
true == 1 //does the boolean value of true equal 1? (True) //not strict
true === 1 //does the boolean value of true equal 1? (False) //strict
Object Oriented PHP
Ask a Question:
You must be logged in to post a comment.