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 is $$ in php?

536


Explain about switch statement in PHP?

595


How to concatenate two strings together in php?

566


What is the difference between Session and Cookie?

585


How to remove the new line character from the end of a text line in php?

530






Why php is used?

607


Explain about a search-friendly site looks like?

496


What is sorting php?

519


What is php array function?

544


Which character is used to match exactly one character?

553


What are regular expressions in programming?

507


How to redirect a page in php?

580


What is $_ files in php?

565


How to get useful error messages in php?

572


What's the difference between accessing a class method via -> and via ::?

532