url querystring problem

Problems with the Windows version of XAMPP, questions, comments, and anything related.

url querystring problem

Postby MagicLantern » 29. April 2006 23:31

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?
MagicLantern
 
Posts: 2
Joined: 29. April 2006 23:16

Postby Dave_L » 30. April 2006 01:59

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']}";
?>
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Postby MagicLantern » 30. April 2006 11:06

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 ;-) )
MagicLantern
 
Posts: 2
Joined: 29. April 2006 23:16


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 128 guests