how to maintained the session from one page to another page
based on the url and then entered into the first page is
logging into instead of secondpage it goes to the another
url.ie first login session togoes to the one url and next
login session it goes to another url
how is it possible in php
please give me answer in that question



how to maintained the session from one page to another page based on the url and then entered into ..

Answer / bharani

first we have to register the url using
session_reigister('user_id');
$_session['user_id']=row(0)

here row(0)hold s the user name=which value you want to
maintain in session...

then in we have the write this code
session_start();
in top of the all page
where u want the session value

Is This Answer Correct ?    5 Yes 2 No

Post New Answer

More PHP Interview Questions

What is php call function?

0 Answers  


Write a program using while loop in php?

0 Answers  


How does php work?

0 Answers  


Echo is used to Display message on screen. Which is used with echo to not output the trailing newline?

0 Answers  


What type of headers that PHP supports?

0 Answers  


How to increase session life time using PHP?

8 Answers  


How can we get ip address of a client in php?

0 Answers  


Is ruby on rails php?

0 Answers  


Which are the best start and end tags to use?

0 Answers  


What is difference between $x and $$x

5 Answers   Mindex, Net Solution, Procon IT Solutions, Trigent,


What the use of var_dump()?

0 Answers  


Explain PHP?

0 Answers  


Categories