Posted by: Sourav | March 2, 2011

Sessions in PHP


<?php
session_start();
?>
<html>
    <head>
        <body>
            <title>
                Sessions are more secure than cookie
            </title>
    </head>
    <body>
        <?php
        $_SESSION[‘first_name’]=”sourav”;
        $_SESSION[‘last_name’]=”bhattacharya”;
        ?>
        <?php
        $name=$_SESSION[‘first_name’].” “.$_SESSION[‘last_name’];
        echo $name;
        ?>
       
    </body>
</html>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: