Re: [PHP] URL variables, and the $_GET[xxx] function...

2004-10-21 Thread Greg Donald
On Thu, 21 Oct 2004 14:08:28 +0100, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 I'm moving hosts for a freelance site I do...
 
 They have an events section, and it's sortable by date, name and category
 etc...
 To achieve this, I passed the search/sort variables via the URL...
 However, I'm testing the new server, and those variables are not being
 detected?
 
 I've put this code at teh top of the code on events page '$sort_by =
 $_GET[sort_by];' etc...
 And while that sorts out the problem, I'm curious as to why I need to do
 that, and if those changes will cause me probs elsewhere?
 
 Perhaps a rookie Q, but I guess we all learn something every day eh?
 
 Any thoughts?

I'm guessing you used to have register_globals on, and now you don't.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] URL variables, and the $_GET[xxx] function...

2004-10-21 Thread R'twick Niceorgaw
Hi Trisan,

Quoting [EMAIL PROTECTED]:

 I've put this code at teh top of the code on events page '$sort_by =
 $_GET[sort_by];' etc...
 And while that sorts out the problem, I'm curious as to why I need to do
 that, and if those changes will cause me probs elsewhere?

Perhaps on your old server, register_globals was on and on the new server it is
off?
Here's a link for more info on it
http://us2.php.net/register_globals

-R'twick
--
This is a signature


This message was sent using IMP, the Internet Messaging Program.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] URL Variables

2003-10-28 Thread Pablo Gosse
On Tuesday, October 28, 2003 8:57 AM Jed R. Brubaker wrote:

 Is there a way to preserve URL variables and have a link simply add a
new
 variable to the end?

 I am tabulating data and I have URL variables defining which dataset
to
 view and in what way to view it. I would now like to set the SQL
statement
 up with a limit and add some Previous, Next commands, and even
paging
 numbers, but how should I go about setting up the link so that the
 existing URL variables are preserved?

$_SERVER['HTTP_REFERER'] will give you the referring url with all vars
attached, so then all you'll need to do is append your new vars to the
end
of this.

Cheers,
Pablo

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] URL Variables

2003-10-28 Thread Chris Shiflett
--- Jed R. Brubaker [EMAIL PROTECTED] wrote:
 Is there a way to preserve URL variables and have a link simply add
 a new variable to the end?

Sure, just use $_SERVER['QUERY_STRING'], which is the current query string, and
append whatever new URL variables you want.

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] URL Variables

2003-10-28 Thread Jed R. Brubaker
Thanks!

Chris Shiflett [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 --- Jed R. Brubaker [EMAIL PROTECTED] wrote:
  Is there a way to preserve URL variables and have a link simply add
  a new variable to the end?

 Sure, just use $_SERVER['QUERY_STRING'], which is the current query
string, and
 append whatever new URL variables you want.

 Chris

 =
 My Blog
  http://shiflett.org/
 HTTP Developer's Handbook
  http://httphandbook.org/
 RAMP Training Courses
  http://www.nyphp.org/ramp

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] URL variables parsing error?

2003-09-18 Thread - Edwin -
Hi,

[EMAIL PROTECTED] wrote:

 Hi all,
 
 I use RedHat9.0 with Apache 2.0.40  PHP 4.2.2
 and I have problem with parsing URL variables...
 
 I use this URL: http://my.domain.mine/index.php?var1=value1var2=value2
 
 and this is my index.php
 
 ?php
   echo var1: $var1 ;
   echo var2: $var2 ;
 
   phpinfo();
 ?
 
 Output of this page is without expansion of my variables var1, var2 at section echo
 but phpinfo expand this:
 
 _GET[var1]value1 
 _GET[var2]value2
 
 Any idea?

Try this:

?php
  echo var1: {$_GET['var1']};
  echo var2: {$_GET['var2']};
  phpinfo();
?

or this:

?php
  echo 'var1: ' . $_GET['var1'];
  echo 'var2: ' . $_GET['var2'];
  phpinfo();
?

If it works, check for register_globals in the archives:

  http://marc.theaimsgroup.com/?l=php-general

HTH,

- E -

__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] URL variables parsing error?

2003-09-18 Thread Jay Blanchard
[snip]
and this is my index.php

?php
  echo var1: $var1 ;
  echo var2: $var2 ;

  phpinfo();
?

Output of this page is without expansion of my variables var1, var2 at
section echo
but phpinfo expand this:

_GET[var1]value1 
_GET[var2]value2
[/snip]

This is not an error. Register globals is off (which is a Good Thing
TM). var1 and var2 are in the $_GET array because they are passed via
a GET method of posting (using the URL). A perusing of the manual at
http://us4.php.net/variables will tell you all you need to know and
more. Please follow all of the links on the page so that the details
will become apparent.

Have a pleasant and productive day.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP url variables

2003-03-14 Thread Cranky Kong
Have a look at the parameter register_global in your php.ini
By default in the recent version of PHP, this parameter is set by default to
off for security reason.
So if you want to use $id, you just have to set this parameter to on


Stephen [EMAIL PROTECTED] a écrit dans le message de news:
[EMAIL PROTECTED]
 Hi

 I have just installed PHP 4 and Apache 2 but when I pass a variable in a
url
 eg ?id=1
 I can't get the variable value by $id, I have to use $_GET['id'] or
 $_POST['id']

 Is there a setting I need to change to allow me to use the $id? If there
is
 it will save a lot of additional coding.

 Thanks,

 Stephen





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP url variables

2003-03-13 Thread Ron Rudman
Try:
parse_str( $_SERVER['QUERY_STRING']);

Stephen [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi

 I have just installed PHP 4 and Apache 2 but when I pass a variable in a
url
 eg ?id=1
 I can't get the variable value by $id, I have to use $_GET['id'] or
 $_POST['id']

 Is there a setting I need to change to allow me to use the $id? If there
is
 it will save a lot of additional coding.

 Thanks,

 Stephen





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] URL variables

2001-10-24 Thread Martin Towell

try $QUERY_STRING

-Original Message-
From: Clint Tredway [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 5:13 AM
To: PHP General
Subject: [PHP] URL variables


How do I reference URL variables..?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



RE: [PHP] URL Variables

2001-05-22 Thread Chadwick, Russell


Variables as part of the url would not be encrypted, but you could send
variables as POST to the secure document and then they would get encrypted -
Russ

---
Toolshed Computer Productions - Professional PHP Hosting
 Hosting - Dedicated Servers - Design - Programming
 http://www.toolshed51.com

-Original Message-
From: Michael Conley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 2:08 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] URL Variables


First, I realize this isn't really a PHP question.

If I include variables in a URL that I am passing to a web server over
HTTPS, is the URL (and hence, the variables) encrypted?
example:  https://www.yourdomain.com?firstname=michaellastname=conley

I need to make sure that the firstname and lastname information is not sent
over the internet in clear text.  



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]