Session in Php

Ads
 

Session in Php

What Is a Session?

View Answers

November 13, 2010 at 11:17 AM

A session is a way to store information (in the form of variables) to be used across multiple pages.A PHP session allowing you to store user information on the server for later use. PHP session user information is temporary if you want to store permanently then store information in the database.

The session_start() function must appear BEFORE the "html" tag.


November 13, 2010 at 11:23 AM

hi,

This is PHP session example for store information in the session variable and retrieve data from the PHP session like:

<?php
session_start();
// store session data
$_SESSION['name']="deepak";
?>

<html>
<body>

<?php
//retrieve session data
echo "User name is ". $_SESSION['name'];
?>

</body>
</html>

Thanks

Ads









Related Tutorials/Questions & Answers:
php session
php session  what is session
php session for login and logout
php session for login and logout  Session management code to create a login and logout session in PHP. Thanks
Advertisements
php session timeout
php session timeout  How to check if the session is out or timeout have occurred in the PHP application
php maintain session id
php maintain session id   How to maintain session ID for a user in PHP
Maximum length of Session ( $_SESSION ) in PHP.
Maximum length of Session ( $_SESSION ) in PHP.  sir, i want to know that how much limit of storing data into session in php. i mean can i store full product descriptions into session. Thank u
session update in php
session update in php  How to session update in php?   $this->session->set_userdata('name', $fullname
Create Session Variable PHP
Create Session Variable PHP  hi, Write a program which shows the example of how to create session variable in PHP. Please suggest the reference... session Variable in PHP. May be this reference will solve your query. Thanks
session management for login logout in php
session management for login logout in php  how to manage session for login and logout in php
PHP Session
PHP Session        A PHP session variable is used to store the information about a user... in the URL.   Example 1:   <?php SESSION_start(); if(isset
setting php session variable by ajax
setting php session variable by ajax  Hello folks, i developing a php website where the content of the section load dynamically from database... tried to use AJAX to call another PHP script to set the session variable
in php What the code is to be written for Authentication with Session Control
in php What the code is to be written for Authentication with Session Control  in php What the code is to be written for Authentication with Session Control
Fatal error: Call to undefined function session_register() in .php file
Fatal error: Call to undefined function session_register() in .php file  I upgraded the PHP and MySQL and in my application following error is coming: Fatal error: Call to undefined function session_register() in ...php file
session
Session Management in PHP  Handling session in PHP. Can anyone please explain it with the help of an existing example about, how to handle a session while a user is logged in PHP
session
session  create multiple login on one page in php but how to use session
Session
Session  What Is a Session?   Hi friends, A session is a logical object created by the PHP engine to allow you to preserve data across subsequent HTTP requests. There is only one session object available to your PHP
session
session  is there any possibility to call one session from another session
Session
Session   how to session maintaining in servlet with use of hidden fieds
session
session  is there any possibility to call one session from another session
session
session  Session management in Java
php
php   what is php   PHP Tutorials
php
php  what is php
php
php using javasript  how to set timer in php using javasript
session
session   explain sessioln tracking in jsp and display program
session
session  Which methods can be invoked by the container on a stateless session bean
php
php  i want to know about php and php plateform required software to make php program and database that used in php program?   Please visit the following link: PHP database
php
php  i want to know about php and php plateform required software to make php program and database that used in php program?   Please visit the following link: PHP database
php
php  show the constructor overloading in php
PHP
PHP  How to work in drupal with PHP
session
session  how can transfer data of one page to another page using session in java swing
Session
Session   why do we need session? actually what stored in a session... and user would not able to retrieve the information. So, Session provides that facility to store information on server memory. 2)Variables are stored in session
php
php  what is php   PHP is one of the most used open source server-side scripting language, which runs on almost all the platform. PHP... and Solaris. To know more about PHP, Visit Here

Ads