Re: [PHP] Query string question

2009-01-13 Thread Robert Cummings
On Tue, 2009-01-13 at 17:21 -0200, Jônatas Zechim wrote:
> I have something like this on my site:
> 
> mysite.com/índex.php?msg=Transa%25E7%25E3o+n%25E3o+autorizada
> 
> i need to convert " Transa%25E7%25E3o+n%25E3o+autorizada" to "Transação não 
> autorizada".
> 
> The letters ç ã, and others (é, í, ...).
> 
> Someone can help me?

urldecode()

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Query string???

2002-11-18 Thread Justin French
on 19/11/02 12:31 AM, Marek Kilimajer ([EMAIL PROTECTED]) wrote:

> instead of
> if(empty($item)) { ...
> I would recomend
> if(is_numeric($item)) { ...

very true -- thanks for picking that up!

Justin French

http://Indent.com.au
Web Developent & 
Graphic Design



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




Re: [PHP] Query string???

2002-11-18 Thread Marek Kilimajer
instead of
if(empty($item)) { ...
I would recomend
if(is_numeric($item)) { ...

Justin French wrote:


So, the link might look like:

item 1

Then page.php might look like this:


include("{$item}.php");
?>

BUT this would be smarter:


// uncomment this next line if you have register_globals OFF
// $item = $_GET['item'];

if(empty($item))
   {
   // set a default item number
   $item = 1;
   }

$file = "{$item}.php3";
if(file_exists($file))
   {
   include($file);
   }
else
   {
   echo "sorry, file {$file} not found";
   }
?>


Enjoy!


Justin


on 18/11/02 11:07 PM, Cyclone Médias ([EMAIL PROTECTED])
wrote:

 

Hi! 

I need to solve this problem:

I have a menu bar on my main page and a dynamic zone on the others levels of
my html/php site. When I am clicking the 'item 1' on my menu, I want to load
item1.php3 in the dynamic section of the next page.

So I think I have to use sometinng like get variable in the adress bar and
after put on my 'next page'   or something like that ?


As you can see I'm a newbie and  a quebecer so, sorry for my english and
thanks for your help!

Ben

   


Justin French

http://Indent.com.au
Web Developent & 
Graphic Design



 



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




Re: [PHP] Query string???

2002-11-18 Thread Justin French
So, the link might look like:

item 1

Then page.php might look like this:



BUT this would be smarter:




Enjoy!


Justin


on 18/11/02 11:07 PM, Cyclone Médias ([EMAIL PROTECTED])
wrote:

> Hi! 
> 
> I need to solve this problem:
> 
> I have a menu bar on my main page and a dynamic zone on the others levels of
> my html/php site. When I am clicking the 'item 1' on my menu, I want to load
> item1.php3 in the dynamic section of the next page.
> 
> So I think I have to use sometinng like get variable in the adress bar and
> after put on my 'next page'   or something like that ?
> 
> 
> As you can see I'm a newbie and  a quebecer so, sorry for my english and
> thanks for your help!
> 
> Ben
> 

Justin French

http://Indent.com.au
Web Developent & 
Graphic Design



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




Re: [PHP] Query String...

2002-07-01 Thread Chris Hewitt

Tim,

$action = $_GET["action"];
should do it. I assume you have register_globals off (as it is by 
default nowadays).

HTH
Chris

Tim Nields wrote:

>Never have encountered this.  When I include a query string on the URL line
>I can not access the variables.
>
>For example:  www.tim.com?action=move
>
>I should be able to access the variable action.  However I am currently not
>able to do this.  I am not receiving an error of any kind, but nothing is
>being produced when I echo or print this as $action.
>
>Is there a setting that I've missed somewhere?
>
>Any help will be much appreciated.
>
>Thanks
>
>Tim Nields
>
>
>



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




Re: [PHP] Query String...

2002-07-01 Thread Nields Timothy M

Thank you very much...

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
> On Tuesday 02 July 2002 04:45, Tim Nields wrote:
> > Never have encountered this.  When I include a query string on the URL
line
> > I can not access the variables.
> >
> > For example:  www.tim.com?action=move
> >
> > I should be able to access the variable action.  However I am currently
not
> > able to do this.  I am not receiving an error of any kind, but nothing
is
> > being produced when I echo or print this as $action.
> >
> > Is there a setting that I've missed somewhere?
> 
> register_globals
> 
> RTFM and the archives.
> 
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> 
> /*
> Truth can wait; he's used to it.
> */
> 

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




RE: [PHP] Query String...

2002-07-01 Thread Dan Vande More

In the beginning of your page try:

$action=$_GET["action"];
echo $action;

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 12:01 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Query String...


On Tuesday 02 July 2002 04:45, Tim Nields wrote:
> Never have encountered this.  When I include a query string on the URL line
> I can not access the variables.
>
> For example:  www.tim.com?action=move
>
> I should be able to access the variable action.  However I am currently not
> able to do this.  I am not receiving an error of any kind, but nothing is
> being produced when I echo or print this as $action.
>
> Is there a setting that I've missed somewhere?

register_globals

RTFM and the archives.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Truth can wait; he's used to it.
*/


-- 
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] Query String...

2002-07-01 Thread Jason Wong

On Tuesday 02 July 2002 04:45, Tim Nields wrote:
> Never have encountered this.  When I include a query string on the URL line
> I can not access the variables.
>
> For example:  www.tim.com?action=move
>
> I should be able to access the variable action.  However I am currently not
> able to do this.  I am not receiving an error of any kind, but nothing is
> being produced when I echo or print this as $action.
>
> Is there a setting that I've missed somewhere?

register_globals

RTFM and the archives.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Truth can wait; he's used to it.
*/


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




Re: [PHP] QUERY STRING question

2002-03-11 Thread Hiroshi Ayukawa

I guess they are almost same.
But, the contents of $QUERY_STRING are different.

Hiroshi Ayukawa
http://hoover.ktplan.ne.jp/kaihatsu/php_en/index.php

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




Re: [PHP] query string

2001-10-30 Thread Frewuill Rodriguez

hey take it easy men.. it's not you.. it's the encoding.. what's happening
is that "=20" "=25" etc means a special caracther  blank space etc.. try
using url_encode() function to pass your parameters.. something like this
would help

$parameters = url_encode("error=25");
index.htm?$parameters

hope this helps
- Original Message -
From: "Richard Baskett" <[EMAIL PROTECTED]>
To: "PHP General" <[EMAIL PROTECTED]>
Sent: Tuesday, October 30, 2001 9:02 AM
Subject: [PHP] query string


> Ok I am pulling my hair out!  Why if I pass error=5 through a query string
> like index.htm?error=5 and then echo it, it's correct, but when I do
> error=25 it echos 2T and when I do error=500 it echos 5TP?  What the heck
is
> going on here?  I pass strings easy enough and I cant remember ever having
> this problem... What's going on!!? :)
>
> Rick
>
>
> --
> 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] Query String Name ?

2001-07-26 Thread Brian White

In PHP, if you set the input fields to be array names then all the results 
get put in an
array:

So: test.php?name[]=joe&name[]=bob

would create an array("joe", "bob" ) in PHP.

If you really can't set it in the form you could access the QUERY_STRING 
environment
variable and parse it directly.

At 11:14 26/07/2001 +0100, A wrote:
>Hi there,
>
>is there any way to access two variables in a query string that have the 
>same name e.g
>
>test.php?name=joe&name=bob
>
>Is there any way to extract both values of name without changing the way 
>the query string is created?
>
>
>Thanks,
>Abe

-
Brian White
Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
Phone: +612-93197901
Web:   http://www.steptwo.com.au/
Email: [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] Query String Name ?

2001-07-26 Thread Daniel Rezny

Hello,

Thursday, July 26, 2001, 12:14:39 PM, you wrote:

A> Hi there,

A> is there any way to access two variables in a query string that have the same name 
e.g

A> test.php?name=joe&name=bob

A> Is there any way to extract both values of name without changing the way the query 
string is created?

But in the script you can use only a last value of the variable. So
there is no reason to have more than one variable in query_string with
same name.

use name1, name2,  this is better. I think.

-- 
Best regards,
 Danielmailto:[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]