Arild Reiten wrote:
Have just installed PHP 4.3.9 and Apache 1.3 on a WinXP computer.
Everything seems ok, but i can not transfer variables with PHP

With this call in IE http://127.0.0.1/test.php?a=1

And test.php looking like this:

<?php
print "Test a=" . $a;
?>

It just prints a=

Any ideas ??


Your code requires register globals to be turned on, by default it is not.

You need to either turn on register globals (bad idea) or depending on how the data was sent to the server use:
$_GET array (for vars in the url)
$_POST array (for posted forms)
$_COOKIE array (for cookie data)
$_REQUEST array (contains data from all three)


In the example above you should have:

<?php
print "Test a=" . $_GET['a'];
?>

Cheers,

--
Brad Kowalczyk
Web Developer
www.ibiscode.com

Reply via email to