Page 1 of 1

url querystring problem

PostPosted: 29. April 2006 23:31
by MagicLantern
Hello,
url querystring is'nt work on my xampp (on 2 pc's, WXP and sp2)
php and mysql works fine..

[URL] http://localhost/xampp/test.php?id=6

<?
echo"id=$id";
?>

local result:
id=

Someone knows this problem?

PostPosted: 30. April 2006 01:59
by Dave_L
Your code will only work if the PHP parameter register_globals is on, which is a bad practice.

Try this:

Code: Select all
<?php
echo "id={$_GET['id']}";
?>

PostPosted: 30. April 2006 11:06
by MagicLantern
Dave_L wrote:Your code will only work if the PHP parameter register_globals is on, which is a bad practice.

Try this:

Code: Select all
<?php
echo "id={$_GET['id']}";
?>



Its works fine now, tnx (learning all the time ;-) )