This is default featured post 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured post 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured post 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured post 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured post 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Wednesday 10 July 2013

What is Cookies in php

Cookies


The state management object using to maintain the state of application Cookies stores the data in client memory location.
These data we can access from any web page within the application

Cookies stores the information in two location, Either Hard disk or Ram memory location of client system

Cookies are divided into Two types


1.In-memory cookies


If we create any cookie without explicit expiry tag comes under in memory cookies. In memory cookies stores the information
in clinet Ram memory location and destroys the data when user closed the browser


2.Persistence cookies


IF we create any cookies with explicit expiry tag
comes under persistence cookies . persistence cookies stores the data in Hard disk and delete the information when the lifetime
cookies complete

SET_cookies


By using this function we can create the cookies in php

$_COOKIES


By Using this global variable we can get the value of cookies.Cookies used in browser memory location that why we cannot access the cookies from one browse to another browser.


Example:
Page 1.php

<?php
set cookies('x',100);
echo "created cookies";
?>


page2.php

<?php
echo "value is ".$_COOKIE['x'];
?>


Steps to create persistence Cookies


1.Get the current date and time Information when user send the request to access the file where we created cookies.
2.Add lifetime to the current data and time to get expiry time.
3.Create cookies with that expiry tag.

Example:


<?php
set cookies('x',100);
Set cookies('y',1001,time()+1000);
echo $_COOKIES['x'];
echo $_COOKIES['y'];
?>


Persistence cookies will store in hard disk in a file of browser memory location
the name of that file is username@domain_name.

We can delete the cookies from client system by recreating the cookies with completed time.


Disadvantage of Cookies


1.Cookies stores the information in client system . that why client can delete the information or client can modify cookies data
2.cookies is storing limited amount of data
3.cookies can store only text data

Saturday 6 July 2013

What is W3c?

What is W3c?


 It stands for world wide web consortium which is an international consortium of companies.it was founded in 1994 by Tim Bernese Lee.

W3c activities


1 W3c creates and maintains WWW standards.
2 W3c is working to standardize the web.
3.W3c standards are called w3c remonstrations.
4.W3c is organized to a number organization etc.

W3c numbers


There are the following well known numbers in w3c


1 IBM
2 microsoft
3.America online
4.Apple
5.Adobe
6.macromedia
7.sunmicrosystem etc

What is internet


 Internet stands for international network. it is the combination of two resource

1. Web resource
2. Network resource

1.Webresourec


It is collection of electric pages or e-pages,developed  and implement by tim berners lee.he is the father of web

2.Network Resource


Collection of hardware and software resource. implement and developed by klain rock is the father of network.

Types Of Errors In Php

Types of Errors in php


There are four types of errors

1.Notice
2.Warning
3.Fatal Error
4.Parse Error


1.Notice


It is nothing but a samll information to user. If we are trying to access undefined variable. The Output is Notice.Notice does'nt stop the execution.

Example:
<?php
$var1="car";
$var 2=3;
echo $var1'.'$var2;
echo $var3;// Notice error
  ?>

By default we cannot see the notice message on browser.Because , The configuration setting ie error_reporting value is "E_ALL" & ~E_NOICE , The notice are displayed by the Browser. we can also display notice within the program by using Error_Reporting(E_ALL).

Example:

<?php
error_reporting(E_ALL)
$var1="car";
$var 2=3;
echo $var1'.'$var2;
echo $var3;// Notice error
?>

2.Warning:


If is same as notice does not stop script execution.It occurs if we are tying to call undefine constant.
In php,we can declare constant by using define.

Example:

<?php
define("sno",10)
echo constant("sno");
echo constant("a");// undefined constant
?>

3.Fatal error:

It stop the execution of webpage from line where the error occurred. If we try to call undefined function.

Example:
<?php
 function f1()
{
echo "welcome  to www.online24by7.info";
}
f1():
f2();// undefined function
?>

4.Parse Error:

It stop the Exection of complete script if there is syntax error

Example

<?php
echo "line 1"
echo "hi"// does not contain semicolon 
?>

Twitter Delicious Facebook Digg Stumbleupon Favorites More