Page 1 of 1

Little problem with URL variables

PostPosted: 08. February 2007 07:52
by stormen81
I have XAMPP 1.5.5 on Windows XP.
But I am having a problem with URL variables.
Example URL: http://localhost/index.php?d=Home
Code: Select all
<?php
//Code for the file
print "This where you are " . $d;
?>

and I would get this for the page
This where you are

I have no clue what is wrong here.... I am know it is not the coding because I another server running the code just fine. I think there is something wrong with a config file and I am not sure what I am looking for in those files.

Thanks
Stormen81

PostPosted: 08. February 2007 14:34
by Wiedmann
But I am having a problem with URL variables.

Sure, you have not read the PHP-Manual:
http://de.php.net/manual/en/language.va ... ternal.php

PostPosted: 08. February 2007 19:40
by stormen81
That does not solve my problem.
I have been using PHP for many years. And developing my own web portal system using PHP/MySQL.

And I am using links like:
http://localhost/index.php?d=testing

I have tried re-installing into a different Hard Drive without changing anything in the config files for apache and PHP. Also check my Registry for anything from an older WAMP that was on my system.

And It still doesn't print the $d variable.

Screen shoot of a test page:
Image

I know it is not my programming that is the problem. It has something to do with XAMPP.

PostPosted: 08. February 2007 19:54
by Wiedmann
That does not solve my problem.

Sure, but only if you really read the page from the link I've given you.
--> Just read the manual, then correct your code and all will work fine.

PostPosted: 09. February 2007 11:29
by tjrush
Stormen81:

I had the same problem. I think you have two choices:

1. Use the super global array $_GET or
2. Turn register_globals on in the PHP.ini file.

I'm using XAMPP for testing on my local PC. Therefore, I chose option 2 because that is the setting that my web host uses. While I will try to use the more secure $_GET in future programming, I was not willing to modify all my production programs so that my test system would work.

____
Tom