hello expert:
got 2 basic questions:
1.don't know how to review php.ini content to check if register_globals is set "on" or "off". i know php.ini is on the server end. how to pull i up?

2. i see a paragraph says..."assuming register_globals is turned off"for this reason, we assume that you have access to the posted variables through the $_POST array only. What you are doing here is looping through $_POST and setting each variable yourself...

foreach($_POST as $key => $value) {

$$key=$value;
}
What does double $$ mean here ? (pass by referecence like c/c++?_

rarely see kind of $$ syntax.

Thank you very much

Use ini_get('register_globals'); to check for it.

It means it cost big dollars. :) Naa just another way of making a variable name. So the value of $key will be the name of the variable. For example observe the following:

$a='C:/dos';
$b='C:/dos/run';
$c='\run\dos\run';
$d='test';
$$d = $c; //only $c and $d is used
echo $test; //displays \run\dos\run

As you can see whatever the value of $d is is the name of the variable for use. So in this case $d equals test so the new variable will be $test.

thank you. as.bhanuprakash. very helpful :)

kkeith29 . thanks

thank you cwarn23 for the sample. help a lot. sure. will msn if stuck again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.