Re: Help with variables



"sideburn" <xxx@xxxxxxx> wrote in message news:BEC0E4B8.16C78%xxx@xxxxxxxxxx
>I cant figure out why my variables aren't getting to my php file
>
> If I have a file called test.php and the contents look like this:
>
> <?php
> echo $example;
> ?>
>
> Why doesn¹t it echo my string if I do this:
>
> http://www.mydomain.com/test.php?example=test
>

To use that particular code ( echo $example; ) you would have to have
"register_globals" turned on - which I personally wouldn't recommend.

Try

<?
echo $_GET["example"];
?>

instead. Or even

<?
$example = $GET["example"];
echo $example;
?>


.