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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the main error types in php?

597


What is stdclass in php?

623


What is the value for this auto incremented field user_pri_id?

588


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

589


Can we override magic methods in php?

608






> symbol is used to redirect the output of a command. State Whether True or False?

766


How do I find out the number of parameters passed into function9?

625


What is foreach loop in php?

622


Why sessions are used in php?

595


Where is session value stored?

638


What is framework? How it works? What is advantage?

578


Which programming language does php resemble to?

630


What are the characteristics of php variables?

608


How can I learn php fast?

648


What are the benefits of composer?

615