Suppose a variable may passed to other page using any of
get,post,session,cookie methods and u want to retrive that
variable value . what is the syntax?

Answers were Sorted based on User's Feedback



Suppose a variable may passed to other page using any of get,post,session,cookie methods and u want..

Answer / tarangini

using $_REQUEST[var]

Is This Answer Correct ?    4 Yes 0 No

Suppose a variable may passed to other page using any of get,post,session,cookie methods and u want..

Answer / deepinder

I agree with all the above answers. In addition i would
like to mention that we refer the variable with the name as
mentioned in the previous page to retrieve its value with
$_REQUEST[].
<input type="text" name="variable"> ---->previous page
$value=$_REQUEST['variable']; ------->next php page

Is This Answer Correct ?    4 Yes 0 No

Suppose a variable may passed to other page using any of get,post,session,cookie methods and u want..

Answer / srinivasan

$_SESSION['var']

Is This Answer Correct ?    2 Yes 0 No

Suppose a variable may passed to other page using any of get,post,session,cookie methods and u want..

Answer / ajay

$var=$_REQUEST['var'];

Is This Answer Correct ?    1 Yes 0 No

Suppose a variable may passed to other page using any of get,post,session,cookie methods and u want..

Answer / raja

using $_POST['var'];

Is This Answer Correct ?    1 Yes 0 No

Suppose a variable may passed to other page using any of get,post,session,cookie methods and u want..

Answer / raju

$_POST["var"];

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More PHP Interview Questions

What is the major php security hole? How to avoid?

0 Answers  


How to get length of an array in PHP?

0 Answers  


how to insert logout time when browser close

1 Answers   Global Softtech,


How is it possible to return a value from a function?

0 Answers  


What are the differences between include() and include_once () functions?

12 Answers  


is php is the best for this situation

2 Answers  


How to break a file path name into parts?

0 Answers  


what is PHP accelerator ?

2 Answers  


what method is used to generate a random number?

4 Answers  


can any one find and tell the difference between dot net and php which one is best ? which one we get more salary? which one is stable and which one is best for freshers and also better in future and carrer ? which one we wil get more salary sir ? please send ur valuable suggestions to kiranpulsar2007@gmail.com

3 Answers  


What distinguishes php from something like client side java script?

0 Answers  


What is the use of mysql_real_escape_string in php?

0 Answers  


Categories