php fopen function and how to use it with files
In this lesson we will talk about how to deal with files in php, first let's create a text file and name it "text.txt", write whatever you want in it
After that we will use php...
include php in html
In this lesson we will talk about include function and how to use it, so let's go
First include function are used to insert a php file into an html file or another php file and it will be executed with the rest of the code in the...
php simple programs
In this lesson we will take a php simple program which can be used to solve 1st degree equations based on what we have learned so far,Let's go
This is the whole code
<style type="text/css">
#e1 {
border:medium;
float:center;
...
php date time
In this lesson we will talk about php date time and how to use time and date in php, we will use a function
called date and this function require three or six parameters days,months,years,hours,minutes,seconds
<?php
echo...
php post get
This lesson will be short be cause i will talk about the php post get and the difference between the post function and the get function, and we will use the form of the last lesson php forms example
The code was like this
<?php
$username= $_POST['user'];
$password= $_POST['password'];
echo...
php form example
What is an form in php? actually the forms are in html not in php but when we put a form in html the php handle all the operations about that form
For example you want to enter your facebook account what you should do?
Of course you...
php functions
what is a function in php?
A function in php is a set of codes that we want to execute it.:
function name of function(parameter)
{
what we want to do
}
The parameter is like a variable, you will understand when we do the example.
But what is the importance of a function? To know that lets do an example.
We want to...
php for loop
In this lesson we will talk about php for loop, there are fore type of loops in php
while,for,do..while and foreach we will talk about for loop in this lesson
for (init, condition, increment)
{
what we want to repeat;
}
init: the variable...
php arrays
What is an array, array in php is a variable which can store many values, there are three types of php arrays
Numeric array : array with a numeric index
Assosiative array : array where their values indexed with specific ID
Multidimensional...
php switch
In this lesson we will talk about switch statment and what does it mean and what it can do, before we start write the code let us give an example first, we want to make a calculator that can do this operations (+,-,*,/)
we can write the...
php if else
In this lesson we will talk about php if else and what does it mean and what we can do with it
so if statement are using to verify a particular condition after it, for example
if you are not busy bring me a cup of coffee, the...
In this lesson we will talk about operations in php and take some examples, Ready let's go
EXAMPLE 01:
<?php
$n1 = "12" ;
$n2 = "4" ;
echo "$n1" + "$n2" ;
?>
You should see 16 on the screen
EXAMPLE 02:
<?php
$n1 = "12" ;
$n2 = "4" ;
echo "$n1" * "$n2" ;
?>
You should see 48 on the screen, easy don't you think
When...
php variables
In this lesson I will talk about variables in php, and firstly i will describe what is a variable in php
A variable in php start with $ sign and the name of the variable
For example $pass = 12;
In this example we have define a...
php sample programs:
Today we will start our first program but we must have a little knowledge of html, some basics things that's all, so let's go
Always the php code start with this tag <?php and ended with this one ?>
Now let's write...
Hello and welcome to my blog
In this blog we will talk about php programming from A to Z, and i hope you enjoy what i give to you
and we will focus on php
knowledge base first and we will move o...
php knowledge base
In this lesson i will talk about all things that you need to start creating php codes and the first thing you will need is a local host and what does this mean, well its mean that you need a server to compile php codes because php...