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

Tell me what sized websites have you worked on in the past?

0 Answers  


What is a variable cost example?

0 Answers  


Can php run on windows server?

0 Answers  


Is php an api?

0 Answers  


1.Where are the cookies storing ? 2.What is the drawback of using cookies ? 3. If two site is having same cookie name and different values what will be the output if we echo the cookie name from those sites ? How can we solve this issue (How can we specify the domain name)?

8 Answers   TCS,






how to add file in php?

1 Answers   CTS,


What is the main difference between require() and require_once()?

0 Answers  


Is it possible to remove the html tags from data?

0 Answers  


Define object-oriented methodology?

0 Answers  


What is lazy loading in php?

0 Answers  


Which is a perfect example of runtime polymorphism?

0 Answers  


Which function is used to strip whitespace?

0 Answers  


Categories