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

Why php is better?

0 Answers  


Why session is required?

0 Answers  


Who is the father of PHP and explain the changes in PHP versions?

13 Answers   Befree, iMark Group, Netizen,


This question is regarding version control. If two developers are committing the same php file at same time what will happen ? What error it will show (if any) ?

2 Answers   TCS,


How to select a database?

0 Answers  






What is the difference between php and cakephp?

0 Answers  


What is difference between strstr() and stristr() in PHP?

0 Answers  


Which is faster for or foreach?

0 Answers  


Explain the types of functions for Splitting String?

0 Answers  


How to declare an array in php?

0 Answers  


How can we display information of a variable and readable by a human with php?

0 Answers  


How can we take a backup of a mysql table and how can we restore it. ?

7 Answers   Brain Infosys, Oracle,


Categories