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

hi! i am tushar. i am trying to insert digital signature in a pdf file using PHP. i create a digital signature jpg image using imagecreatefromjpeg() function, but whenever i trying to insert it into my pdf file it shown this error. "FPDF error: Not a JPEG file: signature.jpg". could some one help me? how can i insert a digital signature in a pdf file using PHP?

1 Answers  


When to use get and post request?

0 Answers  


What are the options to transfer session ids?

0 Answers  


How to restrict the number of users login ? For ex:- if the allowed login is 10, for 11th user, the application should restrict them from login.

1 Answers  


Why delimiter is used in mysql?

0 Answers  






Why do we use session?

0 Answers  


What is the role of php?

0 Answers  


Explain what are the three classes of errors that can occur in php?

0 Answers  


What is difference between variable declaration and variable definition?

0 Answers  


Tell me how do I check if a given variable is empty?

0 Answers  


What Is a Persistent Cookie?

0 Answers  


How to submit form without a submit button.

0 Answers  


Categories