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 does session start do in php?

0 Answers  


Tell us how can we display the output directly to the browser?

0 Answers  


What are the different types of statements that are present in php?

0 Answers  


How many records can be stored in mysql table?

0 Answers  


Explain me what is the importance of "method" attribute in a html form?

0 Answers  






What is the role of php.ini file?

0 Answers  


What is lamp in php?

0 Answers  


What is csrf token and how it works?

0 Answers  


What is difference between rest and http?

0 Answers  


1. Create student database. 2. First page should display the students available in the database. There should be add, edit and delete buttons. 3. There should be option to search students by name, code, date of joining, department or combination of these. 4. Should have an add/edit screen. Add and Edit should be handled in the same page. 5. Delete should ask for confirmation before deleting the actual record. 6. Validation should be done in JavaScript as well as php.

0 Answers   Zonex,


What are the differences between php constants and variables?

0 Answers  


How do I run a php script in windows?

0 Answers  


Categories