Why do we use session?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More PHP Interview Questions

hi guys..i m new to php..and want to learn it including the oops concept...can anybody send me some good programming bases exercise or a small learning project on it at nitsl_a@yahoo.co.in.I know html and going thru some of its websites.But about to go on it practically.plz advice.

1 Answers   College School Exams Tests, Satas, Wipro,


How to remove white spaces from the beginning and/or the end of a string in php?

0 Answers  


i start a new session with : session_start(); then i set some session variable like this : $_SESSION['name']=$_POST['name'];\ and some another variables. at bottom of page i set header to diffrent page : header('location: index.php'); exit(); now in new page (index.php i can't access to my session variables, like $_SESSION['name']) what's wrong ? thanks. here is my files : a.php ======================================== session_start(); require ('config.inc.php'); if(isset($_POST)) foreach($_POST as $v=>$k) { $items[$v]=$k; } $sql="SELECT * FROM members WHERE username='{$items['user']}' AND pass=MD5('{$items['Password']}') "; $res=mysql_query($sql); $row=mysql_fetch_assoc($res); if($row['username']) { $_SESSION['type']=$row['type']; $_SESSION['name']=$row['name']; $_SESSION['family']=$row['family']; $_SESSION['username']=$row['username']; $_SESSION['date']=$row['date']; } header('location: admin.php'); exit(); ====================================== admin.php ===================================== <?php session_start(); if(!isset($_SESSION['admin'])) { header('location: index.php'); exit(); } require ('config.inc.php'); ?> . . . =================================

5 Answers  


how to select single row from table and insert into same table as a new record by using a single sql query.

2 Answers  


What types of images that PHP supports?

2 Answers  






can any please tel me about "Expression Engine"

1 Answers  


Tell me how is it possible to propagate a session id?

0 Answers  


What is abstract class in php?

0 Answers  


Does wordpress run on php 7?

0 Answers  


What are encryption functions in php?

0 Answers  


What does pear stand for?

0 Answers  


Is array empty php?

0 Answers  


Categories