Re: [PHP-DB] passing object elements in urls

2001-02-06 Thread Paul Cooper

On Tue, Feb 06, 2001 at 05:46:25PM +, Darryl Friesen wrote:
> > Got a slight problem. I'm attempting to pass a number of variables from
> > one form to another. The problem occurs when one of the object elements
> > contains more than one word.
> 
> [snip]
> 
> 
> > Any idea how to pass object elements with spaces in a URL?
> 
> Try encoding the spaces as %20 (the hex value for a space).  There's
> probably a PHP function to do this for you (and one to do the reverse) -- I
> haven't looked.

Yes there are: urlencode() and urldecode()

http://www.php.net/manual/en/function.urlencode.php 
http://www.php.net/manual/en/function.urldecode.php 

Paul

> 
> You could try using a + instead of a space too.
> 
> 
> - Darryl
> 
>  --
>   Darryl Friesen, B.Sc., Programmer/Analyst[EMAIL PROTECTED]
>   Education & Research Technology Services, http://gollum.usask.ca/
>   Department of Computing Services,
>   University of Saskatchewan
>  --
>   "Go not to the Elves for counsel, for they will say both no and yes"
> 
> 
> 
> -- 
> PHP Database 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]

-- 
-
Paul Cooper |  Tel: 0121 331 7858
Senior Programmer and Database Engineer |  Fax: 0121 687 7859
UCEcom  |  mailto:[EMAIL PROTECTED]
University of Central England   |  http://www.ucecom.com
Birmingham, B4 7DX  |
-

-- 
PHP Database 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-DB] passing object elements in urls

2001-02-06 Thread Darryl Friesen

> Got a slight problem. I'm attempting to pass a number of variables from
> one form to another. The problem occurs when one of the object elements
> contains more than one word.

[snip]


> Any idea how to pass object elements with spaces in a URL?

Try encoding the spaces as %20 (the hex value for a space).  There's
probably a PHP function to do this for you (and one to do the reverse) -- I
haven't looked.

You could try using a + instead of a space too.


- Darryl

 --
  Darryl Friesen, B.Sc., Programmer/Analyst[EMAIL PROTECTED]
  Education & Research Technology Services, http://gollum.usask.ca/
  Department of Computing Services,
  University of Saskatchewan
 --
  "Go not to the Elves for counsel, for they will say both no and yes"



-- 
PHP Database 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-DB] passing object elements in urls

2001-02-06 Thread BrianSander

Greetings,

Got a slight problem. I'm attempting to pass a number of variables from
one form to another. The problem occurs when one of the object elements
contains more than one word.

Program

The URL shows ...&name=Arizona State University but when I have the next
form print the variable $name it only prints out Arizona and stops.
Other than this everything works fine.

I've tried single and double quotes in various places around the php
expression but nothing is working to get the second form to print the
entire object element.

Any idea how to pass object elements with spaces in a URL?


Thanks.

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