Re: [PHP] urlencode and urldecode

2008-05-18 Thread Ólafur Waage
You can read about apache's mod_include and its echo element.

http://httpd.apache.org/docs/2.2/mod/mod_include.html#element.echo

2008/5/17 Chris W [EMAIL PROTECTED]:
 Whenever you build a query string you need to us the urlencode to encode any
 characters that may be in there that aren't legal for a URL.  On the server
 I am using now, when you access values using $_GET['xyz'], it does the
 urldecode for you.  I'm not positive, but I am pretty sure, that at one time
 on a server I used in the past, that I had to manually call urldecode to
 decode GET vars.  Is there a setting to change this or is it something that
 changed in php in the last few years?

 --
 Chris W
 KE5GIX

 Protect your digital freedom and privacy, eliminate DRM, learn more at
 http://www.defectivebydesign.org/what_is_drm;

 Ham Radio Repeater Database.
 http://hrrdb.com


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



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



[PHP] urlencode and urldecode

2008-05-17 Thread Chris W
Whenever you build a query string you need to us the urlencode to encode 
any characters that may be in there that aren't legal for a URL.  On the 
server I am using now, when you access values using $_GET['xyz'], it 
does the urldecode for you.  I'm not positive, but I am pretty sure, 
that at one time on a server I used in the past, that I had to manually 
call urldecode to decode GET vars.  Is there a setting to change this or 
is it something that changed in php in the last few years?


--
Chris W
KE5GIX

Protect your digital freedom and privacy, eliminate DRM, 
learn more at http://www.defectivebydesign.org/what_is_drm;


Ham Radio Repeater Database.
http://hrrdb.com


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



[PHP] Urlencode vs htmlentities

2005-12-06 Thread Mark Steudel
Lets say I have the following:
 
Current URL: http://www.domain.com/page.php?action=list
http://www.domain.com/page.php?action=listtop=/page.php?action=listid=3
top=/page.php?action=listid=3
 
$top = $_SERVER['PHP_SELF'].'?'.$_SERVER['argv']['0']
 
Now I want to create a URL with a return link in it
 
a href='.$_SERVER['PHP_SELF'].'?action=addamp;return='.$top.' Add
Something /a
 
Should I use htmlentites on $top first?
 
Second let's say instead of constructing a link I want to use a header and
redirect someone
 
header(location: page.php?action=addreturn=.$top );
 
So do I use urlencode here?
 
Lets say I have something that has been htmlentitied, and I want to use a
header command, do I htmlentitydecode and then urlencode?


Re: [PHP] Urlencode vs htmlentities

2005-12-06 Thread comex
 Should I use htmlentites on $top first?

AFAIK, all of what you said is correct except for that, where you
should use htmlentities(urlencode($top)).

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



Re: [PHP] Urlencode vs htmlentities

2005-12-06 Thread Curt Zirzow
On Tue, Dec 06, 2005 at 12:05:10PM -0800, Mark Steudel wrote:
 Lets say I have the following:

Before I go further:

  htmlentities - escapes the output for html
  urlencode- escapes the output for a url

  
 Current URL: http://www.domain.com/page.php?action=list
 http://www.domain.com/page.php?action=listtop=/page.php?action=listid=3
 top=/page.php?action=listid=3
  
 $top = $_SERVER['PHP_SELF'].'?'.$_SERVER['argv']['0']

- Be careful when using PHP_SELF, probably not a factor here but
  consider if someone requested /page.php/foobar?action
  PHP_SELF will be 'page.php/foobar

- $_REQUEST['argv']... well there isn't any such requested
  variabled. 

  
 Now I want to create a URL with a return link in it
  
 a href='.$_SERVER['PHP_SELF'].'?action=addamp;return='.$top.' Add
 Something /a
  
 Should I use htmlentites on $top first?

no.. your are defining a url paremeter, so you should escape for a url

  
 Second let's say instead of constructing a link I want to use a header and
 redirect someone
  
 header(location: page.php?action=addreturn=.$top );
  
 So do I use urlencode here?

yes, cause your are defining a url parameter.

  
 Lets say I have something that has been htmlentitied, and I want to use a
 header command, do I htmlentitydecode and then urlencode?

Lets say i open a bottle of wine for someone, should I take the
first sip and say yes this is a good wine or not, or let them taste
and decide.

I wonder this cause, well, i wonder why the url has anything to do
with htmlentities, cause it doesn't.. all it needs to know is that
what it is sending is ok (urlencoded). The url doesn't care what the
application did prior to sending the data.

Hopefully to explain my first thoughts:

  1. htmlentities should only be applied when outputing data that
 will be interpreted as html.

 ie: echoing to the browser.

  2. urlencode should be used when outputing data that will be
 interpreted within a url.

 ie: making an href or header('Location: ') call, in otherwords
 defining data being sent via http.

HTH,

Curt.
-- 
cat .signature: No such file or directory

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



Re: Re: [PHP] urlencode and google search query

2004-10-28 Thread Joel CARNAT
On Thu, Oct 28 2004 - 00:31, Marek Kilimajer wrote:
 
 I meant get parameters to google:
 
 http://www.google.com/search?q=helpie=utf-8oe=utf-8
 
 you need to change ie parameter ^^ to whatever encoding you are using.

 yepee ! finally got it.
 so the tweak was :
* don't use urlencode()
* add ie=utf-8oe=utf-8

 thanks a lot !

-- 
,-- This mail runs -.
` NetBSD/i386 --'

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



[PHP] urlencode and google search query

2004-10-27 Thread Joel CARNAT
Hi,

I have a submit form from where I can search things to several sites
(google, freshmeat, ...). I use PHP4/urlencode to generate the correct
query. But it seems google does not use the right encoding :(

example - query=programme télé:

$engine = $_POST[engine];
$query = urlencode($_POST[query]);
switch($engine) {
case google:
echo htmlmeta http-equiv=\refresh\ 
content=\0;url=http://www.google.fr/search?q=$query\;/html;
break;
case freshmeat:
echo htmlmeta http-equiv=\refresh\ 
content=\0;url=http://freshmeat.net/search/?q=$query\;/html;
break;
}


when I use my code, the final URL is:
http://www.google.fr/search?q=programme+t%E9l%E9
when I search programme télé straight from google's page, the URL is:

http://www.google.fr/search?num=20hl=frq=programme+t%C3%A9l%C3%A9btnG=Recherchermeta=
i also tried (by hand):
http://www.google.fr/search?q=programme+t%C3%A9l%C3%A9
which is working.
how comes urlencode generates %E9 and google generates %C3%A9 ?
is google using some specific encoding ? any tweak to encode the google way ?

TIA,
Jo

PS: I'm running OpenBSD/sparc64 with Apache 1 and PHP 4 (if it matters)

-- 
,-- This mail runs -.
` NetBSD/i386 --'

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



Re: [PHP] urlencode and google search query

2004-10-27 Thread Marek Kilimajer
Joel CARNAT wrote:
Hi,
I have a submit form from where I can search things to several sites
(google, freshmeat, ...). I use PHP4/urlencode to generate the correct
query. But it seems google does not use the right encoding :(
example - query=programme télé:

$engine = $_POST[engine];
$query = urlencode($_POST[query]);
switch($engine) {
case google:
echo htmlmeta http-equiv=\refresh\ 
content=\0;url=http://www.google.fr/search?q=$query\;/html;
break;
case freshmeat:
echo htmlmeta http-equiv=\refresh\ 
content=\0;url=http://freshmeat.net/search/?q=$query\;/html;
break;
}

when I use my code, the final URL is:
http://www.google.fr/search?q=programme+t%E9l%E9
when I search programme télé straight from google's page, the URL is:

http://www.google.fr/search?num=20hl=frq=programme+t%C3%A9l%C3%A9btnG=Recherchermeta=
i also tried (by hand):
http://www.google.fr/search?q=programme+t%C3%A9l%C3%A9
which is working.
how comes urlencode generates %E9 and google generates %C3%A9 ?
is google using some specific encoding ? any tweak to encode the google way ?
you can specify your encoding to google using ie parameter. and output 
encoding with oe. google usualy uses UTF-8, that's why some single 
characters are encoded in two bytes.

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


Re: Re: [PHP] urlencode and google search query

2004-10-27 Thread Joel CARNAT
On Wed, Oct 27 2004 - 23:41, Marek Kilimajer wrote:
 how comes urlencode generates %E9 and google generates %C3%A9 ?
 is google using some specific encoding ? any tweak to encode the google 
 way ?
 
 you can specify your encoding to google using ie parameter. and output 

 hum... I don't get what you mean :(
 there is no parameter to the urlencode php function, isn't it ?

 encoding with oe. google usualy uses UTF-8, that's why some single 
 characters are encoded in two bytes.
 
 I tried :
echo htmlmeta http-equiv=\refresh\ 
content=\0;url=http://www.google.fr/search?q=.utf8_encode($query).\/html;
 which acts the same, aka %E9

 and
$query = utf8_encode($_POST[query]);
 which is worse than ever :)
 it produces : %20t%C3%83%C6%92%C3%82%C2%A9   %-)

 can you clarify what you mean when you say use the ie param and encoding with oe.

 sorry if those questions seems sily, but I'm not a heavy php coder ;)

TIA,
Jo
-- 

,-- This mail runs -.
` OpenBSD/sparc64 --'

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



Re: [PHP] urlencode and google search query

2004-10-27 Thread Marek Kilimajer
Joel CARNAT wrote:
On Wed, Oct 27 2004 - 23:41, Marek Kilimajer wrote:
how comes urlencode generates %E9 and google generates %C3%A9 ?
is google using some specific encoding ? any tweak to encode the google 
way ?
you can specify your encoding to google using ie parameter. and output 

 hum... I don't get what you mean :(
 there is no parameter to the urlencode php function, isn't it ?

encoding with oe. google usualy uses UTF-8, that's why some single 
characters are encoded in two bytes.
 
 I tried :
echo htmlmeta http-equiv=\refresh\ content=\0;url=http://www.google.fr/search?q=.utf8_encode($query).\/html;
 which acts the same, aka %E9

 and
$query = utf8_encode($_POST[query]);
 which is worse than ever :)
 it produces : %20t%C3%83%C6%92%C3%82%C2%A9   %-)
 can you clarify what you mean when you say use the ie param and encoding with oe.
 sorry if those questions seems sily, but I'm not a heavy php coder ;)
I meant get parameters to google:
http://www.google.com/search?q=helpie=utf-8oe=utf-8
you need to change ie parameter ^^ to whatever encoding you are using.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] urlencode() and newlines?

2004-10-16 Thread Nick Wilson
hello all, 

For reasons beyond my immediate control i have to keep some strings of
text in a text *new line delimited* text file. I also have to urlencode
those strings for use in my script.

Like this: 

## text file
This is a line\nThis is another line
This is another string\nwith some more\nnew lines

Problem is, that urlencoding those lines doesnt seem to work well the
the \n's - when they get to where they are going (another server, not in
my control) the new lines are no longer there...

Can anyone tell me how to get round this issue without storing the
strings in another way? - many thanks! ;-)
-- 
Nick W

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



Re: [PHP] urlencode() and newlines?

2004-10-16 Thread Marek Kilimajer
Nick Wilson wrote:
hello all, 

For reasons beyond my immediate control i have to keep some strings of
text in a text *new line delimited* text file. I also have to urlencode
those strings for use in my script.
Like this: 

## text file
This is a line\nThis is another line
This is another string\nwith some more\nnew lines
Problem is, that urlencoding those lines doesnt seem to work well the
the \n's - when they get to where they are going (another server, not in
my control) the new lines are no longer there...
Can anyone tell me how to get round this issue without storing the
strings in another way? - many thanks! ;-)
Because what you are doing is not urlencoding. Try
echo urlencode(This is a line\nThis is another line);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] urlencode() and newlines?

2004-10-16 Thread Nick Wilson

* and then Marek Kilimajer declared
 Nick Wilson wrote:
 hello all, 
 
 For reasons beyond my immediate control i have to keep some strings of
 text in a text *new line delimited* text file. I also have to urlencode
 those strings for use in my script.
 
 Like this: 
 
 ## text file
 This is a line\nThis is another line
 This is another string\nwith some more\nnew lines
 
 Problem is, that urlencoding those lines doesnt seem to work well the
 the \n's - when they get to where they are going (another server, not in
 my control) the new lines are no longer there...
 
 Can anyone tell me how to get round this issue without storing the
 strings in another way? - many thanks! ;-)
 
 Because what you are doing is not urlencoding. Try
 
 echo urlencode(This is a line\nThis is another line);

Yep, i can see that it's encoded but when the data is POSTed to a form,
it does not come out as a newline...


-- 
Nick W

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



Re: [PHP] urlencode() and newlines?

2004-10-16 Thread Marek Kilimajer
Nick Wilson wrote:
* and then Marek Kilimajer declared
Nick Wilson wrote:
hello all, 

For reasons beyond my immediate control i have to keep some strings of
text in a text *new line delimited* text file. I also have to urlencode
those strings for use in my script.
Like this: 

## text file
This is a line\nThis is another line
This is another string\nwith some more\nnew lines
Problem is, that urlencoding those lines doesnt seem to work well the
the \n's - when they get to where they are going (another server, not in
my control) the new lines are no longer there...
Can anyone tell me how to get round this issue without storing the
strings in another way? - many thanks! ;-)
Because what you are doing is not urlencoding. Try
echo urlencode(This is a line\nThis is another line);

Yep, i can see that it's encoded but when the data is POSTed to a form,
it does not come out as a newline...
Are you sure the other side accepts, does not remove newlines? Create a 
form with textarea that posts to the server

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


Re: [PHP] urlencode() and newlines?

2004-10-16 Thread Nick Wilson

* and then Marek Kilimajer declared
 
 echo urlencode(This is a line\nThis is another line);
 
 
 Yep, i can see that it's encoded but when the data is POSTed to a form,
 it does not come out as a newline...
 
 Are you sure the other side accepts, does not remove newlines? Create a 
 form with textarea that posts to the server

yeah, i guess i'll have to, thanks Marek..

-- 
Nick W

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



[PHP] urlencode - urldecode

2004-08-08 Thread PHP Gen
Hi,
I am using a header(location:) to send a
rawurlencod'ed string to another script...then I tried
decode it and use those values...but its not
working...

snippets of my code: 

// sending file:
$one=rawurlencode(dir_name=$dir_nameimgs_dir=$imgs_dirthumb_pre=$thumb_pretn_width=$tn_widthtn_height=$tn_heightwrite_text=$write_textcolors=$colorsx_pos=$x_posy_pos=$y_poslink1=$link1link2=$link2link3=$link3img_src1=$img_src1img_src2=$img_src2);
header(location: process.php?a=.$one);

Am totally confused as to how to use urldecode to get
back my values to do other operations in my script..

I tried the example from php.net: (example 1)
http://se2.php.net/manual/en/function.urldecode.php

but am unable to adapt it to give me my
variables/values.


The reason I am using rawurlencode is because $link1
and $link2 will contain html tags...

Thanks for your time.
-Mag

=
--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)



__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



Re: [PHP] urlencode - urldecode

2004-08-08 Thread John Holmes
PHP Gen wrote:
// sending file:
$one=rawurlencode(dir_name=$dir_nameimgs_dir=$imgs_dirthumb_pre=$thumb_pretn_width=$tn_widthtn_height=$tn_heightwrite_text=$write_textcolors=$colorsx_pos=$x_posy_pos=$y_poslink1=$link1link2=$link2link3=$link3img_src1=$img_src1img_src2=$img_src2);
header(location: process.php?a=.$one);
Am totally confused as to how to use urldecode to get
back my values to do other operations in my script..
You don't have to decode it on the other end. Everything as you've got 
above (that whole string) will be in $_GET['a'] on process.php.

Since you asked, though, you use urldecode() like this:
$decoded = urldecode($_GET['a']);
That's a lot of information to be sending through the URL, btw. I think 
there's a max of 1024 characters, generally, although each browser is 
different. Just something to note. Maybe sessions would be better?

--
John Holmes
php|architect - The magazine for PHP professionals - http://www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] urlencode - urldecode

2004-08-08 Thread PHP Gen Newbie
Hi,

Thanks again John, point taken...will not trust the
browser, will use sessions :-)

Cheers,
-Mag



--- John Holmes [EMAIL PROTECTED] wrote:

 PHP Gen wrote:
 
  // sending file:
 

$one=rawurlencode(dir_name=$dir_nameimgs_dir=$imgs_dirthumb_pre=$thumb_pretn_width=$tn_widthtn_height=$tn_heightwrite_text=$write_textcolors=$colorsx_pos=$x_posy_pos=$y_poslink1=$link1link2=$link2link3=$link3img_src1=$img_src1img_src2=$img_src2);
  header(location: process.php?a=.$one);
  
  Am totally confused as to how to use urldecode to
 get
  back my values to do other operations in my
 script..
 
 You don't have to decode it on the other end.
 Everything as you've got 
 above (that whole string) will be in $_GET['a'] on
 process.php.
 
 Since you asked, though, you use urldecode() like
 this:
 
 $decoded = urldecode($_GET['a']);
 
 That's a lot of information to be sending through
 the URL, btw. I think 
 there's a max of 1024 characters, generally,
 although each browser is 
 different. Just something to note. Maybe sessions
 would be better?
 
 -- 
 
 John Holmes
 
 php|architect - The magazine for PHP professionals -
 http://www.phparch.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


=
--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)



__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



Re: [PHP] URLencode issues - halp! - code included

2003-01-24 Thread Marek Kilimajer
besides urlencode you should also use htmlspecialchars

SpyProductions Support Team wrote:


Here is some code:


From a form, I get username as $name and it goes to the processing file for

the form, where a sale happens and it sends the code to a different server
like this:


$data = urlencode($name);
print META HTTP-EQUIV='refresh'
CONTENT='0;URL=http://somedestination.php?name=$data';



That server then processes the person and puts them into the MySQL - but if
the name is bad, it errors out and stops the script:

$name = urldecode($name);
if(!$name) { print You entered an invalid name.  Please stop and call us
at; }
else {  Inserts record into database. }



That's it.  It doesn't seem to matter what the name entered is; there is no
rhyme or reason (seemingly) to the names it fails on (as per my previous
post).

urlencode may just be a flaky thing to use?  Perhaps depending on the
browser?

Thanks,

-Mike







 

-Original Message-
From: David T-G [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 3:31 PM
To: PHP General list
Cc: SpyProductions Support Team
Subject: Re: [PHP] URLencode issues - halp!


Mike --

...and then SpyProductions Support Team said...
%
% I am having some issues, apparently, with URL encode.
...
%
% I decided to use this because people are allowed to use *any*
key as part of
% their name, so a name like rt'$%^*'rt is perfectly allowable.

Makes sense, but I'd use base64_encode (with base64_decode, of course)
rather than urlencode; it will properly shield everything.  No, I don't
know why 'normal' names fail and goofy ones don't; without some code and
some specific examples we can't really tell too well :-)


HTH  HAND

:-D
--
David T-G  * There is too much animal courage in
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science
and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!


   




 



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




Re: [PHP] URLencode issues - halp!

2003-01-24 Thread Ernest E Vogelsinger
At 22:30 23.01.2003, David T-G spoke out and said:
[snip] 
...and then SpyProductions Support Team said...
% 
% I am having some issues, apparently, with URL encode.
...
% 
% I decided to use this because people are allowed to use *any* key as part of
% their name, so a name like rt'$%^*'rt is perfectly allowable.


Makes sense, but I'd use base64_encode (with base64_decode, of course)
rather than urlencode; it will properly shield everything.  No, I don't
know why 'normal' names fail and goofy ones don't; without some code and
some specific examples we can't really tell too well :-)
[snip] 

I believe you could even use md5() to encode the logon... would shield
everything too :)


-- 
   O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/


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




[PHP] URLencode issues - halp!

2003-01-23 Thread SpyProductions Support Team

I am having some issues, apparently, with URL encode.

I've got people signing up for a membership on a site, but some of their
memberships fail because the username, which in encoded, sometimes goes
through fine and sometimes does not.

Are there any special reasons this may happen?

I decided to use this because people are allowed to use *any* key as part of
their name, so a name like rt'$%^*'rt is perfectly allowable.

The strange thing is, more normal names like 'star99' or just 'logmein' are
failing, but the weirder character typed names are making it through fine.

Any ideas?

Oh, and BTW, I do use urldecode().  :)

Thanks,

-Mike



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




Re: [PHP] URLencode issues - halp!

2003-01-23 Thread rw
Some code please!

RW

Quoting SpyProductions Support Team [EMAIL PROTECTED]:

### 
### I am having some issues, apparently, with URL encode.
### 
### I've got people signing up for a membership on a site, but some of their
### memberships fail because the username, which in encoded, sometimes goes
### through fine and sometimes does not.
### 
### Are there any special reasons this may happen?
### 
### I decided to use this because people are allowed to use *any* key as part
### of
### their name, so a name like rt'$%^*'rt is perfectly allowable.
### 
### The strange thing is, more normal names like 'star99' or just 'logmein'
### are
### failing, but the weirder character typed names are making it through
### fine.
### 
### Any ideas?
### 
### Oh, and BTW, I do use urldecode().  :)
### 
### Thanks,
### 
### -Mike
### 
### 
### 
### -- 
### PHP General Mailing List (http://www.php.net/)
### To unsubscribe, visit: http://www.php.net/unsub.php
### 
### 




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




Re: [PHP] URLencode issues - halp!

2003-01-23 Thread Chris Shiflett
--- SpyProductions Support Team
[EMAIL PROTECTED] wrote:
 I am having some issues, apparently, with URL encode.
...
 Oh, and BTW, I do use urldecode().  :)

If you are using URL encode in order to pass values on the
URL (and then reference them as $_GET['blah']), then URL
decoding is superfluous and can cause problems.

Some code or more details would be nice, as the other
poster suggested. As it is, we have no idea why you are
using URL encoding, so we have no idea what is not working
for you.

Chris

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




Re: [PHP] URLencode issues - halp!

2003-01-23 Thread David T-G
Mike --

...and then SpyProductions Support Team said...
% 
% I am having some issues, apparently, with URL encode.
...
% 
% I decided to use this because people are allowed to use *any* key as part of
% their name, so a name like rt'$%^*'rt is perfectly allowable.

Makes sense, but I'd use base64_encode (with base64_decode, of course)
rather than urlencode; it will properly shield everything.  No, I don't
know why 'normal' names fail and goofy ones don't; without some code and
some specific examples we can't really tell too well :-)


HTH  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg94223/pgp0.pgp
Description: PGP signature


RE: [PHP] URLencode issues - halp! - code included

2003-01-23 Thread SpyProductions Support Team

Here is some code:

From a form, I get username as $name and it goes to the processing file for
the form, where a sale happens and it sends the code to a different server
like this:


$data = urlencode($name);
print META HTTP-EQUIV='refresh'
CONTENT='0;URL=http://somedestination.php?name=$data';



That server then processes the person and puts them into the MySQL - but if
the name is bad, it errors out and stops the script:

$name = urldecode($name);
if(!$name) { print You entered an invalid name.  Please stop and call us
at; }
else {  Inserts record into database. }



That's it.  It doesn't seem to matter what the name entered is; there is no
rhyme or reason (seemingly) to the names it fails on (as per my previous
post).

urlencode may just be a flaky thing to use?  Perhaps depending on the
browser?

Thanks,

-Mike







 -Original Message-
 From: David T-G [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 23, 2003 3:31 PM
 To: PHP General list
 Cc: SpyProductions Support Team
 Subject: Re: [PHP] URLencode issues - halp!


 Mike --

 ...and then SpyProductions Support Team said...
 %
 % I am having some issues, apparently, with URL encode.
 ...
 %
 % I decided to use this because people are allowed to use *any*
 key as part of
 % their name, so a name like rt'$%^*'rt is perfectly allowable.

 Makes sense, but I'd use base64_encode (with base64_decode, of course)
 rather than urlencode; it will properly shield everything.  No, I don't
 know why 'normal' names fail and goofy ones don't; without some code and
 some specific examples we can't really tell too well :-)


 HTH  HAND

 :-D
 --
 David T-G  * There is too much animal courage in
 (play) [EMAIL PROTECTED] * society and not sufficient moral courage.
 (work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science
 and Health
 http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!





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




Re: [PHP] URLencode issues - halp! - code included

2003-01-23 Thread Leif K-Brooks
Take the

$name = urldecode($name);

bit out.  The decoding is all handled by PHP before your script runs. 
Also, you should look into using $_GET['name'] instead of $name.

SpyProductions Support Team wrote:

Here is some code:


From a form, I get username as $name and it goes to the processing file for

the form, where a sale happens and it sends the code to a different server
like this:


$data = urlencode($name);
print META HTTP-EQUIV='refresh'
CONTENT='0;URL=http://somedestination.php?name=$data';



That server then processes the person and puts them into the MySQL - but if
the name is bad, it errors out and stops the script:

$name = urldecode($name);
if(!$name) { print You entered an invalid name.  Please stop and call us
at; }
else {  Inserts record into database. }



That's it.  It doesn't seem to matter what the name entered is; there is no
rhyme or reason (seemingly) to the names it fails on (as per my previous
post).

urlencode may just be a flaky thing to use?  Perhaps depending on the
browser?

Thanks,

-Mike







 

-Original Message-
From: David T-G [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 3:31 PM
To: PHP General list
Cc: SpyProductions Support Team
Subject: Re: [PHP] URLencode issues - halp!


Mike --

...and then SpyProductions Support Team said...
%
% I am having some issues, apparently, with URL encode.
...
%
% I decided to use this because people are allowed to use *any*
key as part of
% their name, so a name like rt'$%^*'rt is perfectly allowable.

Makes sense, but I'd use base64_encode (with base64_decode, of course)
rather than urlencode; it will properly shield everything.  No, I don't
know why 'normal' names fail and goofy ones don't; without some code and
some specific examples we can't really tell too well :-)


HTH  HAND

:-D
--
David T-G  * There is too much animal courage in
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science
and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!


   




 


--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.





RE: [PHP] URLencode issues - halp! - code included

2003-01-23 Thread SpyProductions Support Team
So what is the decode part for then?  Earlier versions of PHP?

:)

Thanks,

-Mike

  -Original Message-
  From: Leif K-Brooks [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 23, 2003 4:43 PM
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: Re: [PHP] URLencode issues - halp! - code included


  Take the
$name = urldecode($name);bit out.  The decoding is all handled by PHP before
your script runs.  Also, you should look into using $_GET['name'] instead of
$name.

  SpyProductions Support Team wrote:

Here is some code:

From a form, I get username as $name and it goes to the processing file for
the form, where a sale happens and it sends the code to a different server
like this:


$data = urlencode($name);
print META HTTP-EQUIV='refresh'
CONTENT='0;URL=http://somedestination.php?name=$data';



That server then processes the person and puts them into the MySQL - but if
the name is bad, it errors out and stops the script:

$name = urldecode($name);
if(!$name) { print You entered an invalid name.  Please stop and call us
at; }
else {  Inserts record into database. }



That's it.  It doesn't seem to matter what the name entered is; there is no
rhyme or reason (seemingly) to the names it fails on (as per my previous
post).

urlencode may just be a flaky thing to use?  Perhaps depending on the
browser?

Thanks,

-Mike







  -Original Message-
From: David T-G [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 3:31 PM
To: PHP General list
Cc: SpyProductions Support Team
Subject: Re: [PHP] URLencode issues - halp!


Mike --

...and then SpyProductions Support Team said...
%
% I am having some issues, apparently, with URL encode.
...
%
% I decided to use this because people are allowed to use *any*
key as part of
% their name, so a name like rt'$%^*'rt is perfectly allowable.

Makes sense, but I'd use base64_encode (with base64_decode, of course)
rather than urlencode; it will properly shield everything.  No, I don't
know why 'normal' names fail and goofy ones don't; without some code and
some specific examples we can't really tell too well :-)


HTH  HAND

:-D
--
David T-G  * There is too much animal courage in
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science
and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!







--
The above message is encrypted with double rot13 encoding.  Any unauthorized
attempt to decrypt it will be prosecuted to the full extent of the law.



RE: [PHP] URLencode issues - halp! - code included

2003-01-23 Thread Chris Shiflett
--- SpyProductions Support Team
[EMAIL PROTECTED] wrote:
 So what is the decode part for then?  Earlier versions of
 PHP?

No, it is for decoding URL-encoded strings, just as you
would expect.

The reason you do not need to decode URL variables is
because they are not URL-encoded by the time your script
executes.

Chris

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




[PHP] urlencode and decode are producing \\\' instead of \'

2002-03-29 Thread andy

Hi there,

I am trying to fill a form again when an error occures, therefore I redirect
to the form and pass the values via url like this:

HEADER(Location:/profiles/6.$recipient_id.2.html?subject=.rawurlencode($
subject).message=.rawurlencode($message).);

then I put it in again like this
 textarea name=message rows=10 style=width:485px; cols=58
wrap=virtual'.rawurldecode($message).'/textarea

The problem is, that this is causing a message like this:
test  \\\'

So what's wrong? Can anybody help on this?

Thank you,

Andy



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




Re: [PHP] urlencode and decode are producing \\\' instead of \'

2002-03-29 Thread Bogdan Stancescu

You don't have to rawurlDEcode again - that's done automatically. You 
have to encode so you're HTTP compliant, but the decoding is done by PHP 
(or even Apache? I'm not sure) when receiving urlencoded strings via URL 
and form data.

Bogdan

andy wrote:

Hi there,

I am trying to fill a form again when an error occures, therefore I redirect
to the form and pass the values via url like this:

HEADER(Location:/profiles/6.$recipient_id.2.html?subject=.rawurlencode($
subject).message=.rawurlencode($message).);

then I put it in again like this
 textarea name=message rows=10 style=width:485px; cols=58
wrap=virtual'.rawurldecode($message).'/textarea

The problem is, that this is causing a message like this:
test  \\\'

So what's wrong? Can anybody help on this?

Thank you,

Andy







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




Re: [PHP] urlencode and decode are producing \\\' instead of \'

2002-03-29 Thread andy

does not help, any other ideas?


Bogdan Stancescu [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 You don't have to rawurlDEcode again - that's done automatically. You
 have to encode so you're HTTP compliant, but the decoding is done by PHP
 (or even Apache? I'm not sure) when receiving urlencoded strings via URL
 and form data.

 Bogdan

 andy wrote:

 Hi there,
 
 I am trying to fill a form again when an error occures, therefore I
redirect
 to the form and pass the values via url like this:
 

HEADER(Location:/profiles/6.$recipient_id.2.html?subject=.rawurlencode(
$
 subject).message=.rawurlencode($message).);
 
 then I put it in again like this
  textarea name=message rows=10 style=width:485px; cols=58
 wrap=virtual'.rawurldecode($message).'/textarea
 
 The problem is, that this is causing a message like this:
 test  \\\'
 
 So what's wrong? Can anybody help on this?
 
 Thank you,
 
 Andy
 
 
 






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




Re: [PHP] urlencode and decode are producing \\\' instead of \'

2002-03-29 Thread Andrey Hristov

try to do double rawurldecode().

Andrey

- Original Message - 
From: andy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 29, 2002 2:36 PM
Subject: Re: [PHP] urlencode and decode are producing \\\' instead of \'


 does not help, any other ideas?
 
 
 Bogdan Stancescu [EMAIL PROTECTED] schrieb im Newsbeitrag
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  You don't have to rawurlDEcode again - that's done automatically. You
  have to encode so you're HTTP compliant, but the decoding is done by PHP
  (or even Apache? I'm not sure) when receiving urlencoded strings via URL
  and form data.
 
  Bogdan
 
  andy wrote:
 
  Hi there,
  
  I am trying to fill a form again when an error occures, therefore I
 redirect
  to the form and pass the values via url like this:
  
 
 HEADER(Location:/profiles/6.$recipient_id.2.html?subject=.rawurlencode(
 $
  subject).message=.rawurlencode($message).);
  
  then I put it in again like this
   textarea name=message rows=10 style=width:485px; cols=58
  wrap=virtual'.rawurldecode($message).'/textarea
  
  The problem is, that this is causing a message like this:
  test  \\\'
  
  So what's wrong? Can anybody help on this?
  
  Thank you,
  
  Andy
  
  
  
 
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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




Re: [PHP] urlencode and decode are producing \\\' instead of \'

2002-03-29 Thread andy

does not work. Just like the decode function is out of order!
It is not even decoding \'

Andy


Andrey Hristov [EMAIL PROTECTED] schrieb im Newsbeitrag
00e301c1d71e$b00569a0$0b01a8c0@ANDreY">news:00e301c1d71e$b00569a0$0b01a8c0@ANDreY...
 try to do double rawurldecode().

 Andrey

 - Original Message -
 From: andy [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, March 29, 2002 2:36 PM
 Subject: Re: [PHP] urlencode and decode are producing \\\' instead of \'


  does not help, any other ideas?
 
 
  Bogdan Stancescu [EMAIL PROTECTED] schrieb im Newsbeitrag
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   You don't have to rawurlDEcode again - that's done automatically. You
   have to encode so you're HTTP compliant, but the decoding is done by
PHP
   (or even Apache? I'm not sure) when receiving urlencoded strings via
URL
   and form data.
  
   Bogdan
  
   andy wrote:
  
   Hi there,
   
   I am trying to fill a form again when an error occures, therefore I
  redirect
   to the form and pass the values via url like this:
   
  
 
HEADER(Location:/profiles/6.$recipient_id.2.html?subject=.rawurlencode(
  $
   subject).message=.rawurlencode($message).);
   
   then I put it in again like this
textarea name=message rows=10 style=width:485px; cols=58
   wrap=virtual'.rawurldecode($message).'/textarea
   
   The problem is, that this is causing a message like this:
   test  \\\'
   
   So what's wrong? Can anybody help on this?
   
   Thank you,
   
   Andy
   
   
   
  
  
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 




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




Re: [PHP] urlencode and decode are producing \\\' instead of \'

2002-03-29 Thread Jason Wong

On Friday 29 March 2002 20:56, andy wrote:
 does not work. Just like the decode function is out of order!
 It is not even decoding \'

I am trying to fill a form again when an error occures, therefore I
  
   redirect
  
to the form and pass the values via url like this:
 
 HEADER(Location:/profiles/6.$recipient_id.2.html?subject=.rawurlencode
 (
 
   $
  
subject).message=.rawurlencode($message).);

then I put it in again like this
 textarea name=message rows=10 style=width:485px; cols=58
wrap=virtual'.rawurldecode($message).'/textarea

The problem is, that this is causing a message like this:
test  \\\'

So what's wrong? Can anybody help on this?

Well your problem is not caused by the rawurlencode, rawurldecode. It's 
probably because you have magic_quotes_gpc set to on. 

Try this:

For your URL: rawurlencode(stripslashes($subject)), and same for $message.

For your textarea: htmlspecialchars($subject),  $message.

If you're putting $subject  $message into a DB you would probably want to do 
the reverse of htmlspecialchars() before inserting them into the DB.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
If you don't know what game you're playing, don't ask what the score is.
*/


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




Re: [PHP] urlencode and decode are producing \\\' instead of \'

2002-03-29 Thread Bogdan Stancescu

Jason Wong wrote:

Well your problem is not caused by the rawurlencode, rawurldecode. It's 
probably because you have magic_quotes_gpc set to on. 

Try this:

For your URL: rawurlencode(stripslashes($subject)), and same for $message.

For your textarea: htmlspecialchars($subject),  $message.

If you're putting $subject  $message into a DB you would probably want to do 
the reverse of htmlspecialchars() before inserting them into the DB.


Mr. Wong is wright :-) The only problem is that you should 
rawurlencode(stripslashes($subject)) in the header and 
htmlspecialchars(stripslashes($subject)) in the textarea for the 
expected results.

Bogdan



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




Re: [PHP] urlencode and decode are producing \\\' instead of \'

2002-03-29 Thread Anders Henke

Hi!

What about using stripslashes:
$variable = stripslashes($variable);

Also see http://www.php.net/stripslashes

/Anders Henke


Jason Wong [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]...
 On Friday 29 March 2002 20:56, andy wrote:
  does not work. Just like the decode function is out of order!
  It is not even decoding \'

 I am trying to fill a form again when an error occures, therefore
I
   
redirect
   
 to the form and pass the values via url like this:
  
 
HEADER(Location:/profiles/6.$recipient_id.2.html?subject=.rawurlencode
  (
  
$
   
 subject).message=.rawurlencode($message).);
 
 then I put it in again like this
  textarea name=message rows=10 style=width:485px;
cols=58
 wrap=virtual'.rawurldecode($message).'/textarea
 
 The problem is, that this is causing a message like this:
 test  \\\'
 
 So what's wrong? Can anybody help on this?

 Well your problem is not caused by the rawurlencode, rawurldecode. It's
 probably because you have magic_quotes_gpc set to on.

 Try this:

 For your URL: rawurlencode(stripslashes($subject)), and same for $message.

 For your textarea: htmlspecialchars($subject),  $message.

 If you're putting $subject  $message into a DB you would probably want to
do
 the reverse of htmlspecialchars() before inserting them into the DB.

 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk

 /*
 If you don't know what game you're playing, don't ask what the score is.
 */




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




[PHP] urlencode() and rawurlencode()

2001-10-18 Thread Olexandr Vynnychenko

Hello php-general,

  People, tell me please what's the difference between subj, except
  that the 1st translates space into +.

-- 
Best regards,
 Olexandr Vynnychenko  mailto:[EMAIL PROTECTED]



-- 
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]




[PHP] urlencode

2001-09-07 Thread Alejandro Molina

Hi,
I need to know wich is the best way to send variables through an URL,that if
the variables are of the string type, and what if the variable has spaces
like $string='this is a test'.
I have read about the use of urlencode(), but I have a strange behaviour
using this function, sometimes it work and sometimes not.
for an example I send the variable $user='user 1', and in the url there
appears user=user+1 (which I think is correct) but when I read the variable
in the php page it displays user+1 (doesn´t it has to return to user '1'?).

Thanks

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.268 / Virus Database: 140 - Release Date: 8/7/01


-- 
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] urlencode

2001-09-07 Thread Christopher CM Allen

 for an example I send the variable $user='user 1', and in the url there
 appears user=user+1 (which I think is correct) but when I read the
variable
 in the php page it displays user+1 (doesn´t it has to return to user
'1'?).

urlencodes counterpart is urldecode
you need to decode each variable that youhave encoded


-- 
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] URLencode

2001-09-07 Thread Brandon Orther

I just realized that on the server I am trying to run this on, URLEncode
is working like rawurlencode.   Does anyone have any idea why this might
be happening? 

Thank you,


Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
  

-Original Message-
From: Brandon Orther [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 07, 2001 2:41 PM
To: PHP User Group
Subject: [PHP] URLencode

Hello,
 
I am working on a script and using urlencode but not getting the results
I want.  Does anyone know how to convert the spaces of a sting of text
in + instead of %20?
 
Thanks


-- 
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] URLencode

2001-09-07 Thread Tom Carter

Simplest way is to do this

$string = my string;
$string=urlencode(str_replace( ,+,$string));

ie use str_replace to manually replace spaces with +, urlencode then won't
do anything further to it

- Original Message -
From: Brandon Orther [EMAIL PROTECTED]
To: PHP User Group [EMAIL PROTECTED]
Sent: Friday, September 07, 2001 11:05 PM
Subject: RE: [PHP] URLencode


 I just realized that on the server I am trying to run this on, URLEncode
 is working like rawurlencode.   Does anyone have any idea why this might
 be happening?

 Thank you,

 
 Brandon Orther
 WebIntellects Design/Development Manager
 [EMAIL PROTECTED]
 800-994-6364
 www.webintellects.com
 

 -Original Message-
 From: Brandon Orther [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 07, 2001 2:41 PM
 To: PHP User Group
 Subject: [PHP] URLencode

 Hello,

 I am working on a script and using urlencode but not getting the results
 I want.  Does anyone know how to convert the spaces of a sting of text
 in + instead of %20?

 Thanks


 --
 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]



-- 
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]




[PHP] urlencode/decode

2001-08-06 Thread Michael Mehlmann

this script works as expected, if you don't submit ,' and \
but if you use ,' or \ these characters will be quoted with \

'\test'\ - \\'\\test\\'\\

?
  echo htmlentities($val).form method=GETinput type=text name=valinput
type=submit/form;
?

how to get rid of this???
I don't want any character been quoted!!!

thanks
michi

-- 
Aufgepasst - jetzt viele 11 New WebHosting Pakete ohne
Einrichtungsgebuehr + 1 Monat Grundgebuehrbefreiung!
http://puretec.de/index.html?ac=OM.PU.PU003K00736T0492a


-- 
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]




[PHP] urlencode

2001-03-17 Thread rkirk.com Mail

Help - I've a problem when using urlencode/decode functions (same with
rawurl...).
If I encode :
mnemonic = "lnkphoto"

I get:
mnemonic+%3D++%22lnkphoto%22

And if decode it during the same script execution it converts back to
exactly:
mnemonic = "lnkphoto"
which is what I'd expect.

However, if I pass this value as a URL argument and decode it in the
receiving script I get:
mnemonic = \"lnkphoto\"
which causes me all sorts of problems!
Is this a "feature" or have I misunderstood the way this should work?

Thanks





-- 
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] urlencode

2001-03-17 Thread John Lim

You have magic_quotes_runtime enabled which causes this behaviour. You can
disable it by turning it off in your PHP.ini.

 See http://php.net/manual

"rkirk.com Mail" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Help - I've a problem when using urlencode/decode functions (same with
 rawurl...).
 If I encode :
 mnemonic = "lnkphoto"

 I get:
 mnemonic+%3D++%22lnkphoto%22

 And if decode it during the same script execution it converts back to
 exactly:
 mnemonic = "lnkphoto"
 which is what I'd expect.

 However, if I pass this value as a URL argument and decode it in the
 receiving script I get:
 mnemonic = \"lnkphoto\"
 which causes me all sorts of problems!
 Is this a "feature" or have I misunderstood the way this should work?

 Thanks










 --
 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]



-- 
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] urlencode

2001-03-17 Thread Richard Kirk

No, its set to "off".


-Original Message-
From: John Lim [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 17, 2001 5:14 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] urlencode


You have magic_quotes_runtime enabled which causes this behaviour. You can
disable it by turning it off in your PHP.ini.

 See http://php.net/manual

"rkirk.com Mail" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Help - I've a problem when using urlencode/decode functions (same with
 rawurl...).
 If I encode :
 mnemonic = "lnkphoto"

 I get:
 mnemonic+%3D++%22lnkphoto%22

 And if decode it during the same script execution it converts back to
 exactly:
 mnemonic = "lnkphoto"
 which is what I'd expect.

 However, if I pass this value as a URL argument and decode it in the
 receiving script I get:
 mnemonic = \"lnkphoto\"
 which causes me all sorts of problems!
 Is this a "feature" or have I misunderstood the way this should work?

 Thanks










 --
 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]



--
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]



-- 
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] urlencode

2001-03-17 Thread John Lim

Sorry, its magic_quotes_gpc -- i got confused. The magic_quotes_runtime one
is for databases.

Regards, John

"Richard Kirk" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 No, its set to "off".


 -Original Message-
 From: John Lim [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, March 17, 2001 5:14 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] urlencode


 You have magic_quotes_runtime enabled which causes this behaviour. You can
 disable it by turning it off in your PHP.ini.

  See http://php.net/manual

 "rkirk.com Mail" [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Help - I've a problem when using urlencode/decode functions (same with
  rawurl...).
  If I encode :
  mnemonic = "lnkphoto"
 
  I get:
  mnemonic+%3D++%22lnkphoto%22
 
  And if decode it during the same script execution it converts back to
  exactly:
  mnemonic = "lnkphoto"
  which is what I'd expect.
 
  However, if I pass this value as a URL argument and decode it in the
  receiving script I get:
  mnemonic = \"lnkphoto\"
  which causes me all sorts of problems!
  Is this a "feature" or have I misunderstood the way this should work?
 
  Thanks
 
 
 
 


 --
--
 


  --
  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]



 --
 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]



 --
 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]




-- 
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]