Superglobals and Variables in URLs?
Posted: Sun Feb 10, 2008 12:29 pm
Hi,
I'm new to this forum and hope that a few people (smarter then me) can help me out!
I recently was forced to switch hosting companies because my previous hosting company literally went out of business. Anyone with OnSmart better jump ship quick!
Anyways, the majority of the website transferred over to my new host with out a problem. There is one section though that isn't working properly. This section basically uses a flash file (.swf) to have the user make certain selections and to submit them. These selection are passed to another page using the following, very fimiliar, URL format.
http://www.mywebsite.com/loader.php?fil ... =thisvalue
Now, with my old hosting company, I didn't have to explicitly load each variable using the $_GET statement from with in loader.php. The variables embedded in the URL would automatically be recognized and could be used through out my loader.php script. This made it easy since there are literally 100s of variables that could potentially be passed from the flash file.
With my new hosting company, the variables embedded in the URL are not automatically recognzed with the loader.php page. Instead I have to spedifically load each variable using:
$filename = $_GET["filename"];
$subfilename = $_GET["subfilename"];
$anothervariable = $_GET["anothervariable"];
Simple enough, but with hundreds of variables and with several different pages and sections that potentially are affected (loader.php is not the only page in which variables are passed to and not explicitly loaded) this small problem has now turned into a huge problem for me.
My old hosting company used PHP version 4.3 I believe on an Appache/Linux server. My new hosting company uses PHP version 5.2.5 on an Appache/Linux server.
So my question is, can PHP on my new server be setup to work like the old ... is there a setting for this? I've been searching and can't definitely find one ... track_vars?? If this can't be done, is there someway that I can parse the URL and pull out each variable with out explicitly loading each variable using $_GET? Hope that makes sense.
If anyone could help me with this I would be EXTREMELY grateful!
Thanks,
Olimess
I'm new to this forum and hope that a few people (smarter then me) can help me out!
I recently was forced to switch hosting companies because my previous hosting company literally went out of business. Anyone with OnSmart better jump ship quick!
Anyways, the majority of the website transferred over to my new host with out a problem. There is one section though that isn't working properly. This section basically uses a flash file (.swf) to have the user make certain selections and to submit them. These selection are passed to another page using the following, very fimiliar, URL format.
http://www.mywebsite.com/loader.php?fil ... =thisvalue
Now, with my old hosting company, I didn't have to explicitly load each variable using the $_GET statement from with in loader.php. The variables embedded in the URL would automatically be recognized and could be used through out my loader.php script. This made it easy since there are literally 100s of variables that could potentially be passed from the flash file.
With my new hosting company, the variables embedded in the URL are not automatically recognzed with the loader.php page. Instead I have to spedifically load each variable using:
$filename = $_GET["filename"];
$subfilename = $_GET["subfilename"];
$anothervariable = $_GET["anothervariable"];
Simple enough, but with hundreds of variables and with several different pages and sections that potentially are affected (loader.php is not the only page in which variables are passed to and not explicitly loaded) this small problem has now turned into a huge problem for me.
My old hosting company used PHP version 4.3 I believe on an Appache/Linux server. My new hosting company uses PHP version 5.2.5 on an Appache/Linux server.
So my question is, can PHP on my new server be setup to work like the old ... is there a setting for this? I've been searching and can't definitely find one ... track_vars?? If this can't be done, is there someway that I can parse the URL and pull out each variable with out explicitly loading each variable using $_GET? Hope that makes sense.
If anyone could help me with this I would be EXTREMELY grateful!
Thanks,
Olimess