473,237 Members | 1,223 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,237 software developers and data experts.

$_GET not available problem?

I have the following code:

<?php

print "1. " . $_GET['c'] . "-2. " . $_GET['s'];

?>

The file is called test_globals.php.
On most servers I can type:

http://servername/test_globals.php?c=yes&s=no

and the output will be similar to:

1. yes-2. no

However, on one server, I get the following result:

1. -2.

My question is, why doesn't $_GET return the values of "yes" and "no" ?
On this server (which is running Apache 2.0 and PHP 4.2.2), register_globals is set to 'on' and safe-mode is set to 'off'. I've already tried to change the code to:

<?php

print "1. " . $c . "-2. " . $s;

?>

and still get the result:

1. -2.

Are there any other directives that must be set in a certain way to enable
$_GET ?

Thanks all.
Sean
Oct 4 '05 #1
2 3920
:o Look at the Revision of PHP. ;) $_GET wasn't implemented until version 4.1.0. You may have to revert to using the older function $HTTP_GET_VARS.
Oct 4 '05 #2
Okay, I tried substituting $_GET with $HTTP_GET_VARS but still get the same result of:

1. -2.

I don't know if this matters but the server is a secure server, meaning it's accessed with the protocol prefix of "https" rather than "http":

https://servername/test_globals.php?c=yes&s=no

Maybe I should have mentioned this initially.
The php version is 4.2.2, so $_GET should be available, not to mention $HTTP_GET_VARS.

Thanks though,
Sean
Oct 4 '05 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: gf | last post by:
I had a client recently contact me with a script that wasn't working. I quickly isolated the problem as to the fact that the $_GET array was not being made available to all scripts, even though...
2
by: carramba | last post by:
Hi! Tahnx for taking time and reading! This script should load default page and default stylesheet, but its only loads default page, you have to actualy click on the style link to load style......
7
by: Dan | last post by:
I was trying to troubleshoot a login page that doesn't work - it keeps saying the login/password is missing - when my tracing discovered this peculiar behavior. register_globals is off, so at...
27
by: meltedown | last post by:
urlencode turns # into %23 When I sent it thru $_GET, it dissapears, along with anything that comes after it. for example: urlencode turns HOYDM_EXC_#4_NAT into HOYDM_EXC_%234_NAT When I...
1
by: lawrence k | last post by:
If I copy and paste this url into my browser: http://www.bluecasts.com/index.php?templateId=PT_distroDemo.txt&amp;distroTitle=priceTitle.php&amp;distroMainContent=prices.php and I've a simple page with...
2
by: lawrence k | last post by:
I noticed this odd PHP function in an article about AJAX and Prototype: > http://www.sitepoint.com/article/painless-javascript-prototype/2 > > Prototype adds a custom HTTP header to all its...
9
by: wouter | last post by:
hey hi..... I wanna make a switch wich does this: if pagid is set do A, if catid is set do B, if projectid is set do C, else do D. So i was thinking something like this:
2
by: keeps21 | last post by:
I have a script that recieves an id number via the address bar when a link is clicked. ie . index.php?id=1 if the link was for the story whose ID is 1. My script checks if a user is logged in,...
8
by: The KwikOne | last post by:
Since to have a page validate (HTML and XHTML) you should have your URL parameters separated by the appropriate separator. However, if an ampersand is used it needs to be expressed as &amp; (example:...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.