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 polymorphism with example in php?

508


Differentiate between php5 and php7?

623


Inside a php function, what param needs to be set in order to access a global variable?

537


Which is the correct way to check if a session has already been started ?

517


What is json php?

525






How cookies are transported from servers to browsers?

514


Tell me how to strip whitespace (or other characters) from the beginning and end of a string?

530


Do you know what are traits?

530


Does php need html?

529


How to execute an sql query?

508


Do you know how to get the ip address of the client?

516


Is php better than java?

539


What is different between software and app

1227


Can we override magic methods in php?

534


What are php libraries?

494