Can someone please explain me what I do wrong to pass a variable through the link. I've simplified my code.
I've got a file test.php:
<?php
print("value: $value<br>"); / when the page will load the first time it'll be emty /
?>
<STYLE TYPE="text/css">
.item {color: black; font-family:"Arial" ; font-size: 11;
}
.highlight
{color: blue ;font: bold; font-family:"Arial Narrow" ; font-size: 11
}
</STYLE>
<SCRIPT src="textcolor_change.class"></SCRIPT>
<!!! TRANSPARANT BUTTON !!!>
<FORM name='nu_spelen' action='test_value.php' method=POST>
<center><?php print("$value"); ?>
<BUTTON STYLE="background-color: transparent;width:28;height:20" onClick="parent.location='code/c_nu_spelen.php'">
<font CLASS="item"> OK </font></BUTTON></center>
</FORM>
Now when you click on the button "OK" you'll go to the page "test_value.php" with the following code in it:
<?php
$value = 1;
print("");
print("<HEAD>");
print("value = $value");
print("<META HTTP-EQUIV=\"refresh\" content=\"2;URL='test.php?value=$value'\">");
print("</HEAD>");
print("");
?>
On this page I'll declare $value to 1 (just a test). You can see the following now in the browser: value= 1
The page will redirect in 2 seconds again to the page "test.php".
In the address of the browser you can see the following: ...test.php?value=1
As you can see above there's in the file "test.php" print("value: $value<br>"); to display the result of the declared value in test_value.php. Normally I should see:
value: 1, but the value is empty! (value: )
If you know what I do wrong I would surely appreciate it!
Thnx in advance,
Glenn