Posted by Tony on 09/26/46 11:17
"sideburn" <xxx@yyy.zzz> wrote in message news:BEC0E4B8.16C78%xxx@yyy.zzz...
>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;
?>
Navigation:
[Reply to this message]
|