How I use global variable in another page without using
$_GET method?
Answers were Sorted based on User's Feedback
Answer / ravi baba zaa
Using Global variable it is not possible.
Sending data from one page to another can be done following ways
GET
POST
SESSION
| Is This Answer Correct ? | 11 Yes | 5 No |
Answer / raju kumar
we can use query string and can retrieve on other page .
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / aiajz
$_REQUEST['value']
is the global variable that can get the values of $_GET[],$_POST[] and Query string,
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / n.viranjaneyulu
global varibles used only in function that is also with in
same page only.
If u want that variable value means ,u can use sesission
then u can use any page with in project.
| Is This Answer Correct ? | 1 Yes | 3 No |
Answer / minnie
The above answer is wrong.
U can use that in any function in any class.
In which function u need to use global variable, do the
following:-
global $testVariable;
Now u can this variable in the current function
| Is This Answer Correct ? | 1 Yes | 3 No |
Answer / cyrus
are you mad what you have to do with global variable????
| Is This Answer Correct ? | 4 Yes | 13 No |
1. Write a function to swap two values ? $a = 10; $b = 20; echo $a, $b; swap(); // If u want u can pass parameters echo $a, $b; // It should print 20 , 10
14 Answers Aquasol, Infosys, TCS, Torque Infotech,
what is array_search() in php?
What is the definition of a session?
What is a helper function?
what the new feature add in php 7.2?
What do you use php for?
Explain the differences between get and post methods?
What is the difference between array_map () and array_shift ()?
How do I run php?
Which is the dependent variable?
How would you impletement download and upload a file in php
What is php used for?