Little problem with URL variables

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

Little problem with URL variables

Postby stormen81 » 08. February 2007 07:52

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
stormen81
 
Posts: 2
Joined: 08. February 2007 04:59
Location: VT

Postby Wiedmann » 08. February 2007 14:34

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
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby stormen81 » 08. February 2007 19:40

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.
stormen81
 
Posts: 2
Joined: 08. February 2007 04:59
Location: VT

Postby Wiedmann » 08. February 2007 19:54

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.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby tjrush » 09. February 2007 11:29

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
tjrush
 
Posts: 18
Joined: 09. February 2007 11:11


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 95 guests