due to space it gives above error- Parameter passing

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ujbandara
Forum Newbie
Posts: 2
Joined: Mon Aug 21, 2006 6:58 am

due to space it gives above error- Parameter passing

Post by ujbandara »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi,

Using java program I send values as parameter of URL.
Ex- as customer name I send “ Saman Silva” and send.

But because of space between first name and last name, it gives error. As error it says “The Parameter is incorrect”

Code: Select all

<?php 

$cName 		= $_GET['cName'];  

Echo $Name

?>

cName value should be Saman Silva, but due to space it gives above error.


Thanks,
Upul

:?:


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Re: due to space it gives above error- Parameter passing

Post by feyd »

ujbandara wrote:cName value should be Saman Silva, but due to space it gives above error.
Who is "it"? I doubt it'd be PHP. The only error I see if you echoing a nonexistant variable: $cName vs $Name, two different things.
ujbandara
Forum Newbie
Posts: 2
Joined: Mon Aug 21, 2006 6:58 am

Post by ujbandara »

ok ok...
we say that it is

Echo $cName

but even though it gives didnt acess space character...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

echo $_SERVER['QUERY_STRING'] and post it please.

You may need to look at your page source to get the full output of the echo.
Post Reply