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

Which operator is used to concatenate two strings in PHP?

0 Answers  


how can we check mail function with '127.0.0.1' (before submitting a site?

1 Answers  


How to implement a class named dragonball. This class must have an attribute named ballcount (which starts from 0) and a method ifoundaball. When ifoundaball is called, ballcount is increased by one. If the value of ballcount is equal to seven, then the message you can ask your wish is printed, and ballcount is reset to 0. How would you implement this class?

0 Answers  


Does php require a web server?

0 Answers  


How does html form submit work?

0 Answers  






How many types of php are there?

0 Answers  


Suppose your zend engine supports the mode <? ?> Then how can you configure your php zend engine to support <?php ?> Mode ?

0 Answers  


Explain what is meant by pear in php?

0 Answers  


What is final class and final method?

0 Answers  


What is a trait in php?

0 Answers  


if i give Limit for mysql query through php command line script like this for ex. $limit=500; $total_items = 1500; for($start=0;$start<$total_items;){ $command = "/usr/bin/php -q /home/sitename/public_html/admin/feedmanager/test.php feedid ".$_GET['feedid']." start ".$start." end ".$limit ; $start = $start+$limit; $command_result = system($command); } so it's execute command for 3 times so it give limit to sql query but if i have 27000 data so it takes long time? so my question is that is that any way from php command line script that i can use for collect all the data at once?

0 Answers  


Is php secure?

0 Answers  


Categories